public class AddImageSimple
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
AddImageSimple(PdfManager manager)
Deprecated.
Constructs an
AddImageSimple instance based on
a specified PdfManager . |
Modifier and Type | Method and Description |
---|---|
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.
|
protected static final PdfName PDFNAME_CONTENTS
protected static final PdfName PDFNAME_RESOURCES
protected static final PdfName PDFNAME_PROCSET
protected static final PdfName PDFNAME_IMAGEC
protected static final PdfName PDFNAME_PARENT
protected static final PdfName PDFNAME_NAME
protected static final PdfName PDFNAME_TYPE
protected static final PdfName PDFNAME_XOBJECT
protected static final PdfName PDFNAME_SUBTYPE
protected static final PdfName PDFNAME_IMAGE
protected static final PdfName PDFNAME_FILTER
protected static final PdfName PDFNAME_DCTDECODE
protected static final PdfName PDFNAME_WIDTH
protected static final PdfName PDFNAME_HEIGHT
protected static final PdfName PDFNAME_BITSPERCOMPONENT
protected static final PdfName PDFNAME_COLORSPACE
protected static final PdfName PDFNAME_DEVICERGB
protected static final PdfInteger PDFINTEGER_8
protected PdfManager _m
public AddImageSimple(PdfManager manager)
AddImageSimple
instance based on
a specified PdfManager
.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
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.PdfFormatException
java.io.IOException
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
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.PdfFormatException
java.io.IOException