Class PdfTemplate
java.lang.Object
com.aowagie.text.pdf.PdfContentByte
com.aowagie.text.pdf.PdfTemplate
- Direct Known Subclasses:
PdfImportedPage, PdfPatternPainter
Implements the form XObject.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected RectangleThe bounding box of this templateprotected com.aowagie.text.pdf.PdfTransparencyGroupprotected PdfOCGprotected PdfArrayprotected com.aowagie.text.pdf.PageResourcesThe resources used by this templateprotected PdfIndirectReferenceThe indirect reference to this templateprotected intstatic final intFields inherited from class PdfContentByte
content, LINE_CAP_BUTT, pdf, separator, state, writer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PdfTemplatecreateTemplate(PdfWriter writer, float width, float height) Creates a new template.Gets a duplicate of thisPdfTemplate.com.aowagie.text.pdf.PdfTransparencyGroupgetGroup()Getter for property group.floatGets the bounding height of this template.Gets the indirect reference to this template.getLayer()Gets the layer this template belongs to.intgetType()floatgetWidth()Gets the bounding width of this template.voidsetBoundingBox(Rectangle bBox) voidsetGroup(com.aowagie.text.pdf.PdfTransparencyGroup group) Setter for property group.voidsetHeight(float height) Sets the bounding height of this template.voidSets the layer this template belongs to.voidsetWidth(float width) Sets the bounding width of this template.Methods inherited from class PdfContentByte
addImage, addImage, addImage, addTemplate, addTemplate, arc, beginText, bezierArc, checkWriter, clip, closePath, closePathEoFillStroke, closePathFillStroke, closePathStroke, concatCTM, createTemplate, curveTo, endText, eoClip, eoFill, fill, getCharacterSpacing, getHorizontalScaling, getInternalBuffer, getLeading, getPdfDocument, getPdfWriter, getRootOutline, getWordSpacing, getXTLM, getYTLM, lineTo, moveTo, newPath, rectangle, rectangle, reset, resetCMYKColorFill, resetCMYKColorStroke, resetGrayFill, resetGrayStroke, resetRGBColorFill, resetRGBColorStroke, restoreState, roundRectangle, saveState, setAction, setCharacterSpacing, setCMYKColorFill, setCMYKColorFillF, setCMYKColorStroke, setCMYKColorStrokeF, setColorFill, setColorFill, setColorStroke, setColorStroke, setFlatness, setFontAndSize, setGrayFill, setGrayStroke, setGState, setHorizontalScaling, setLeading, setLineCap, setLineDash, setLineDash, setLineDash, setLineJoin, setLineWidth, setLiteral, setLiteral, setLiteral, setMiterLimit, setPatternFill, setPatternFill, setPatternStroke, setPatternStroke, setRGBColorFill, setRGBColorFillF, setRGBColorStroke, setRGBColorStrokeF, setShadingFill, setShadingStroke, setTextMatrix, setTextRenderingMode, setTextRise, setWordSpacing, showText, stroke, toString
-
Field Details
-
TYPE_PATTERN
public static final int TYPE_PATTERN- See Also:
-
type
protected int type -
thisReference
The indirect reference to this template -
pageResources
protected com.aowagie.text.pdf.PageResources pageResourcesThe resources used by this template -
bBox
The bounding box of this template -
matrix
-
group
protected com.aowagie.text.pdf.PdfTransparencyGroup group -
layer
-
-
Constructor Details
-
PdfTemplate
protected PdfTemplate()Creates aPdfTemplate.
-
-
Method Details
-
createTemplate
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 usewidth- the bounding box widthheight- the bounding box height- Returns:
- the created template
-
setWidth
public void setWidth(float width) Sets the bounding width of this template.- Parameters:
width- the bounding width
-
setHeight
public void setHeight(float height) Sets the bounding height of this template.- Parameters:
height- the bounding height
-
getWidth
public float getWidth()Gets the bounding width of this template.- Returns:
- width the bounding width
-
getHeight
public float getHeight()Gets the bounding height of this template.- Returns:
- height the bounding height
-
getBoundingBox
-
setBoundingBox
-
setLayer
Sets the layer this template belongs to.- Parameters:
layer- the layer this template belongs to
-
getLayer
Gets the layer this template belongs to.- Returns:
- the layer this template belongs to or
nullfor no layer defined
-
getIndirectReference
Gets the indirect reference to this template.- Returns:
- the indirect reference to this template
-
getDuplicate
Gets a duplicate of thisPdfTemplate. All the members are copied by reference but the buffer stays different.- Overrides:
getDuplicatein classPdfContentByte- Returns:
- a copy of this
PdfTemplate
-
getType
public int getType() -
getGroup
public com.aowagie.text.pdf.PdfTransparencyGroup getGroup()Getter for property group.- Returns:
- Value of property group.
-
setGroup
public void setGroup(com.aowagie.text.pdf.PdfTransparencyGroup group) Setter for property group.- Parameters:
group- New value of property group.
-