public abstract class PageObject
extends java.lang.Object
PageObject
represents a PDF PageObject in Page.
The PageObject
abstract class defines methods to set Matrix of a PageObject.
Function
can set Matrix of a
PageObject.setMatrix(Matrix)
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_ALL
Page object for all types.
|
static int |
TYPE_FORMXOBJECT
Form XObject object.
|
static int |
TYPE_IMAGE
Image object
|
static int |
TYPE_PATH
Path object
|
static int |
TYPE_SHADING
Shading object
|
static int |
TYPE_TEXT
Text object.
|
Modifier and Type | Method and Description |
---|---|
long |
getFillColor()
Get fill color of a page object.
|
long |
getHandle()
Get the handle of a
PageObject . |
long |
getStrokeColor()
Get stroke color of a page object.
|
abstract int |
getType()
Get type of a page object.
|
void |
release()
Release a page object which is created or which is cloned but not
inserted into any PDF page.
|
void |
setFillColor(long color)
Set fill color of a page object.
|
void |
setMatrix(Matrix matrix)
Set matrix of a page object.
|
void |
setStrokeColor(long color)
Set stroke color of a page object.
|
public static final int TYPE_ALL
public static final int TYPE_TEXT
public static final int TYPE_PATH
public static final int TYPE_IMAGE
public static final int TYPE_SHADING
public static final int TYPE_FORMXOBJECT
public long getHandle()
PageObject
.PageObject
.public abstract int getType()
public void setMatrix(Matrix matrix) throws PDFException
If it's a text object, matrix of this object can be set only if it has a font.
matrix
- A Matrix
object to be set.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
,
Matrix
public void setFillColor(long color) throws PDFException
color
- A long
value to be set. Format: 0xAARRGGBB.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
public void setStrokeColor(long color) throws PDFException
Note: It will not take effect if the text mode is
when page object is
a text object.TextState.TEXTMODE_FILL
color
- A long
value to be set. Format: 0xAARRGGBB.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
,
TextState
public long getFillColor() throws PDFException
long
value that receives fill color. Format: 0xAARRGGBB.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
public long getStrokeColor() throws PDFException
long
value that receives stroke color. Format: 0xAARRGGBB.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
public void release() throws PDFException
This function is used to release page objects which are created by
functions
or
ImageObject.create(PDFPage)
, but not be inserted to
PDF page.TextObject.create(PDFPage)
PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
,
ImageObject
,
TextObject