com.lowagie.text.pdf

Class PdfTemplate

public class PdfTemplate extends PdfContentByte

Implements the form XObject.
Field Summary
protected RectanglebBox
The bounding box of this template
protected PdfTransparencyGroupgroup
protected PdfOCGlayer
protected PdfArraymatrix
protected PageResourcespageResources
The resources used by this template
protected PdfIndirectReferencethisReference
The indirect reference to this template
protected inttype
static intTYPE_IMPORTED
static intTYPE_PATTERN
static intTYPE_TEMPLATE
Constructor Summary
protected PdfTemplate()
Creates a PdfTemplate.
PdfTemplate(PdfWriter wr)
Creates new PdfTemplate
Method Summary
voidbeginVariableText()
static PdfTemplatecreateTemplate(PdfWriter writer, float width, float height)
Creates a new template.
static PdfTemplatecreateTemplate(PdfWriter writer, float width, float height, PdfName forcedName)
voidendVariableText()
RectanglegetBoundingBox()
PdfContentBytegetDuplicate()
Gets a duplicate of this PdfTemplate.
PdfStreamgetFormXObject()
Gets the stream representing this template.
PdfTransparencyGroupgetGroup()
Getter for property group.
floatgetHeight()
Gets the bounding heigth of this template.
PdfIndirectReferencegetIndirectReference()
Gets the indirect reference to this template.
PdfOCGgetLayer()
Gets the layer this template belongs to.
PdfArraygetMatrix()
PageResourcesgetPageResources()
PdfObjectgetResources()
Constructs the resources used by this template.
intgetType()
floatgetWidth()
Gets the bounding width of this template.
voidsetBoundingBox(Rectangle bBox)
voidsetGroup(PdfTransparencyGroup group)
Setter for property group.
voidsetHeight(float height)
Sets the bounding heigth of this template.
voidsetLayer(PdfOCG layer)
Sets the layer this template belongs to.
voidsetMatrix(float a, float b, float c, float d, float e, float f)
voidsetWidth(float width)
Sets the bounding width of this template.

Field Detail

bBox

protected Rectangle bBox
The bounding box of this template

group

protected PdfTransparencyGroup group

layer

protected PdfOCG layer

matrix

protected PdfArray matrix

pageResources

protected PageResources pageResources
The resources used by this template

thisReference

protected PdfIndirectReference thisReference
The indirect reference to this template

type

protected int type

TYPE_IMPORTED

public static final int TYPE_IMPORTED

TYPE_PATTERN

public static final int TYPE_PATTERN

TYPE_TEMPLATE

public static final int TYPE_TEMPLATE

Constructor Detail

PdfTemplate

protected PdfTemplate()
Creates a PdfTemplate.

PdfTemplate

PdfTemplate(PdfWriter wr)
Creates new PdfTemplate

Parameters: wr the PdfWriter

Method Detail

beginVariableText

public void beginVariableText()

createTemplate

public static PdfTemplate createTemplate(PdfWriter writer, float width, float height)
Creates a new template.

Creates a new template that is nothing more than a form XObject. This template can be included in this template or in another template. Templates are only written to the output when the document is closed permitting things like showing text in the first page that is only defined in the last page.

Parameters: writer the PdfWriter to use width the bounding box width height the bounding box height

Returns: the templated created

createTemplate

static PdfTemplate createTemplate(PdfWriter writer, float width, float height, PdfName forcedName)

endVariableText

public void endVariableText()

getBoundingBox

public Rectangle getBoundingBox()

getDuplicate

public PdfContentByte getDuplicate()
Gets a duplicate of this PdfTemplate. All the members are copied by reference but the buffer stays different.

Returns: a copy of this PdfTemplate

getFormXObject

PdfStream getFormXObject()
Gets the stream representing this template.

Returns: the stream representing this template

getGroup

public PdfTransparencyGroup getGroup()
Getter for property group.

Returns: Value of property group.

getHeight

public float getHeight()
Gets the bounding heigth of this template.

Returns: heigth the bounding height

getIndirectReference

public PdfIndirectReference getIndirectReference()
Gets the indirect reference to this template.

Returns: the indirect reference to this template

getLayer

public PdfOCG getLayer()
Gets the layer this template belongs to.

Returns: the layer this template belongs to or null for no layer defined

getMatrix

PdfArray getMatrix()

getPageResources

PageResources getPageResources()

getResources

PdfObject getResources()
Constructs the resources used by this template.

Returns: the resources used by this template

getType

public int getType()

getWidth

public float getWidth()
Gets the bounding width of this template.

Returns: width the bounding width

setBoundingBox

public void setBoundingBox(Rectangle bBox)

setGroup

public void setGroup(PdfTransparencyGroup group)
Setter for property group.

Parameters: group New value of property group.

setHeight

public void setHeight(float height)
Sets the bounding heigth of this template.

Parameters: height the bounding height

setLayer

public void setLayer(PdfOCG layer)
Sets the layer this template belongs to.

Parameters: layer the layer this template belongs to

setMatrix

public void setMatrix(float a, float b, float c, float d, float e, float f)

setWidth

public void setWidth(float width)
Sets the bounding width of this template.

Parameters: width the bounding width