com.etymon.pjx.util
Class AddImageSimple

java.lang.Object
  extended by com.etymon.pjx.util.AddImageSimple

Deprecated. This class will be removed when a more comprehensive image class is completed.

public class AddImageSimple
extends java.lang.Object

Provides a very rudimentary function for adding JPEG images to a PDF document. This works with most JPEG images.


Field Summary
protected  PdfManager _m
          Deprecated. The manager associated with this document.
protected static PdfInteger PDFINTEGER_8
          Deprecated.  
protected static PdfName PDFNAME_BITSPERCOMPONENT
          Deprecated.  
protected static PdfName PDFNAME_COLORSPACE
          Deprecated.  
protected static PdfName PDFNAME_CONTENTS
          Deprecated.  
protected static PdfName PDFNAME_DCTDECODE
          Deprecated.  
protected static PdfName PDFNAME_DEVICERGB
          Deprecated.  
protected static PdfName PDFNAME_FILTER
          Deprecated.  
protected static PdfName PDFNAME_HEIGHT
          Deprecated.  
protected static PdfName PDFNAME_IMAGE
          Deprecated.  
protected static PdfName PDFNAME_IMAGEC
          Deprecated.  
protected static PdfName PDFNAME_NAME
          Deprecated.  
protected static PdfName PDFNAME_PARENT
          Deprecated.  
protected static PdfName PDFNAME_PROCSET
          Deprecated.  
protected static PdfName PDFNAME_RESOURCES
          Deprecated.  
protected static PdfName PDFNAME_SUBTYPE
          Deprecated.  
protected static PdfName PDFNAME_TYPE
          Deprecated.  
protected static PdfName PDFNAME_WIDTH
          Deprecated.  
protected static PdfName PDFNAME_XOBJECT
          Deprecated.  
 
Constructor Summary
AddImageSimple(PdfManager manager)
          Deprecated. Constructs an AddImageSimple instance based on a specified PdfManager.
 
Method Summary
 void addImage(java.nio.ByteBuffer image, int imageWidth, int imageHeight, PdfName imageName, PdfReference page, float positionX, float positionY, float scaleX, float scaleY, boolean background)
          Deprecated. Adds a specified JPEG image (contained in a buffer) to a page in the PDF document.
 void addImage(java.io.File imageFile, int imageWidth, int imageHeight, PdfName imageName, PdfReference page, float positionX, float positionY, float scaleX, float scaleY, boolean background)
          Deprecated. Adds a specified JPEG image (contained in a file) to a page in the PDF document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PDFNAME_CONTENTS

protected static final PdfName PDFNAME_CONTENTS
Deprecated. 

PDFNAME_RESOURCES

protected static final PdfName PDFNAME_RESOURCES
Deprecated. 

PDFNAME_PROCSET

protected static final PdfName PDFNAME_PROCSET
Deprecated. 

PDFNAME_IMAGEC

protected static final PdfName PDFNAME_IMAGEC
Deprecated. 

PDFNAME_PARENT

protected static final PdfName PDFNAME_PARENT
Deprecated. 

PDFNAME_NAME

protected static final PdfName PDFNAME_NAME
Deprecated. 

PDFNAME_TYPE

protected static final PdfName PDFNAME_TYPE
Deprecated. 

PDFNAME_XOBJECT

protected static final PdfName PDFNAME_XOBJECT
Deprecated. 

PDFNAME_SUBTYPE

protected static final PdfName PDFNAME_SUBTYPE
Deprecated. 

PDFNAME_IMAGE

protected static final PdfName PDFNAME_IMAGE
Deprecated. 

PDFNAME_FILTER

protected static final PdfName PDFNAME_FILTER
Deprecated. 

PDFNAME_DCTDECODE

protected static final PdfName PDFNAME_DCTDECODE
Deprecated. 

PDFNAME_WIDTH

protected static final PdfName PDFNAME_WIDTH
Deprecated. 

PDFNAME_HEIGHT

protected static final PdfName PDFNAME_HEIGHT
Deprecated. 

PDFNAME_BITSPERCOMPONENT

protected static final PdfName PDFNAME_BITSPERCOMPONENT
Deprecated. 

PDFNAME_COLORSPACE

protected static final PdfName PDFNAME_COLORSPACE
Deprecated. 

PDFNAME_DEVICERGB

protected static final PdfName PDFNAME_DEVICERGB
Deprecated. 

PDFINTEGER_8

protected static final PdfInteger PDFINTEGER_8
Deprecated. 

_m

protected PdfManager _m
Deprecated. 
The manager associated with this document.

Constructor Detail

AddImageSimple

public AddImageSimple(PdfManager manager)
Deprecated. 
Constructs an AddImageSimple instance based on a specified PdfManager.

Method Detail

addImage

public void addImage(java.io.File imageFile,
                     int imageWidth,
                     int imageHeight,
                     PdfName imageName,
                     PdfReference page,
                     float positionX,
                     float positionY,
                     float scaleX,
                     float scaleY,
                     boolean background)
              throws java.io.IOException,
                     PdfFormatException
Deprecated. 
Adds a specified JPEG image (contained in a file) to a page in the PDF document. This method requires the calling method to specify the original size of the image.

Parameters:
imageFile - the file containing the JPEG image.
imageWidth - the original width of the image.
imageHeight - the original height of the image.
imageName - a name object to associate with the image, for identification purposes.
page - an indirect reference to the page dictionary object that the image will be added to.
positionX - the X location to position the image at.
positionY - the Y location to position the image at.
scaleX - a scaling factor in the X dimension.
scaleY - a scaling factor in the Y dimension.
background - if true, the image will be layered behind the existing page contents rather than on top of it. This can be used to create simple watermarks.
Throws:
PdfFormatException
java.io.IOException

addImage

public void addImage(java.nio.ByteBuffer image,
                     int imageWidth,
                     int imageHeight,
                     PdfName imageName,
                     PdfReference page,
                     float positionX,
                     float positionY,
                     float scaleX,
                     float scaleY,
                     boolean background)
              throws java.io.IOException,
                     PdfFormatException
Deprecated. 
Adds a specified JPEG image (contained in a buffer) to a page in the PDF document. This method requires the calling method to specify the original size of the image.

Parameters:
image - the buffer containing the JPEG image. This method reads from the current position until there are no more bytes remaining.
imageWidth - the original width of the image.
imageHeight - the original height of the image.
imageName - a name object to associate with the image, for identification purposes.
page - an indirect reference to the page dictionary object that the image will be added to.
positionX - the X location to position the image at.
positionY - the Y location to position the image at.
scaleX - a scaling factor in the X dimension.
scaleY - a scaling factor in the Y dimension.
background - if true, the image will be layered behind the existing page contents rather than on top of it. This can be used to create simple watermarks.
Throws:
PdfFormatException
java.io.IOException