PJX

com.etymon.pjx.util
Class AddImageSimple

java.lang.Object
  extended bycom.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.


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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

Copyright © 1998-2004 Etymon Systems, Inc.

The PDF data structures, operators, and specification are
Copyright © 1985-2004 Adobe Systems Incorporated.