| java.lang.Object com.etymon.pjx.util.AddImageSimple
AddImageSimple | public class AddImageSimple (Code) | | Provides a very rudimentary function for adding JPEG images to a
PDF document. This works with most JPEG images.
author: Nassib Nassar |
Constructor Summary | |
public | AddImageSimple(PdfManager manager) Constructs an AddImageSimple instance based on
a specified PdfManager . |
Method Summary | |
public void | addImage(File imageFile, int imageWidth, int imageHeight, PdfName imageName, PdfReference page, float positionX, float positionY, float scaleX, float scaleY, boolean background) Adds a specified JPEG image (contained in a file) to a page
in the PDF document. | public void | addImage(ByteBuffer image, int imageWidth, int imageHeight, PdfName imageName, PdfReference page, float positionX, float positionY, float scaleX, float scaleY, boolean background) Adds a specified JPEG image (contained in a buffer) to a
page in the PDF document. |
PDFNAME_BITSPERCOMPONENT | final protected static PdfName PDFNAME_BITSPERCOMPONENT(Code) | | |
PDFNAME_COLORSPACE | final protected static PdfName PDFNAME_COLORSPACE(Code) | | |
PDFNAME_CONTENTS | final protected static PdfName PDFNAME_CONTENTS(Code) | | |
PDFNAME_DCTDECODE | final protected static PdfName PDFNAME_DCTDECODE(Code) | | |
PDFNAME_DEVICERGB | final protected static PdfName PDFNAME_DEVICERGB(Code) | | |
PDFNAME_FILTER | final protected static PdfName PDFNAME_FILTER(Code) | | |
PDFNAME_HEIGHT | final protected static PdfName PDFNAME_HEIGHT(Code) | | |
PDFNAME_IMAGEC | final protected static PdfName PDFNAME_IMAGEC(Code) | | |
PDFNAME_PARENT | final protected static PdfName PDFNAME_PARENT(Code) | | |
PDFNAME_PROCSET | final protected static PdfName PDFNAME_PROCSET(Code) | | |
PDFNAME_RESOURCES | final protected static PdfName PDFNAME_RESOURCES(Code) | | |
PDFNAME_SUBTYPE | final protected static PdfName PDFNAME_SUBTYPE(Code) | | |
PDFNAME_XOBJECT | final protected static PdfName PDFNAME_XOBJECT(Code) | | |
AddImageSimple | public AddImageSimple(PdfManager manager)(Code) | | Constructs an AddImageSimple instance based on
a specified PdfManager .
|
addImage | public void addImage(File imageFile, int imageWidth, int imageHeight, PdfName imageName, PdfReference page, float positionX, float positionY, float scaleX, float scaleY, boolean background) throws IOException, PdfFormatException(Code) | | 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. Parameters: imageWidth - the original width of the image. Parameters: imageHeight - the original height of the image. Parameters: imageName - a name object to associate with the image,for identification purposes. Parameters: page - an indirect reference to the page dictionaryobject that the image will be added to. Parameters: positionX - the X location to position the image at. Parameters: positionY - the Y location to position the image at. Parameters: scaleX - a scaling factor in the X dimension. Parameters: scaleY - a scaling factor in the Y dimension. Parameters: background - if true , the image will belayered behind the existing page contents rather than ontop of it. This can be used to create simple watermarks. throws: PdfFormatException - |
addImage | public void addImage(ByteBuffer image, int imageWidth, int imageHeight, PdfName imageName, PdfReference page, float positionX, float positionY, float scaleX, float scaleY, boolean background) throws IOException, PdfFormatException(Code) | | 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. Thismethod reads from the current position until there are nomore bytes remaining. Parameters: imageWidth - the original width of the image. Parameters: imageHeight - the original height of the image. Parameters: imageName - a name object to associate with the image,for identification purposes. Parameters: page - an indirect reference to the page dictionaryobject that the image will be added to. Parameters: positionX - the X location to position the image at. Parameters: positionY - the Y location to position the image at. Parameters: scaleX - a scaling factor in the X dimension. Parameters: scaleY - a scaling factor in the Y dimension. Parameters: background - if true , the image will belayered behind the existing page contents rather than ontop of it. This can be used to create simple watermarks. throws: PdfFormatException - |
|
|