public class PdfFormXObject extends PdfXObject
Modifier and Type | Field and Description |
---|---|
protected PdfResources |
resources |
Constructor and Description |
---|
PdfFormXObject(PdfPage page)
Creates form XObject from page content.
|
PdfFormXObject(PdfStream pdfStream)
Create PdfFormXObject instance by PdfStream .
|
PdfFormXObject(Rectangle bBox)
Creates a new instance of Form XObject.
|
PdfFormXObject(WmfImageData image, PdfDocument pdfDocument)
Creates a form XObject from WmfImageData .
|
Modifier and Type | Method and Description |
---|---|
static Rectangle |
calculateBBoxMultipliedByMatrix(PdfFormXObject form)
Calculates the coordinates of the xObject BBox multiplied by the Matrix field.
|
void |
flush()
To manually flush a PdfObject behind this wrapper, you have to ensure that this object is added to the document, i.e.
|
PdfArray |
getBBox()
Gets Form XObject's BBox, PdfName.BBox key.
|
float |
getHeight()
Gets height based on XObject's BBox.
|
PdfString |
getMarkStyle()
Gets a text string representing the printer’s mark in human-readable form.
|
PdfName |
getProcessColorModel()
Gets process color model of trap network appearance, PdfName.PCM key.
|
PdfResources |
getResources()
Gets PdfResources of the Form XObject.
|
PdfArray |
getSeparationColorNames()
Gets separation color names of trap network appearance, PdfName.SeparationColorNames key.
|
PdfArray |
getTrapRegions()
Gets an array of TrapRegion objects defining the page’s trapping zones and the associated trapping parameters, as described in Adobe Technical Note #5620, Portable Job Ticket Format.
|
PdfString |
getTrapStyles()
Gets a human-readable text string that described this trap network to the user.
|
float |
getWidth()
Gets width based on XObject's BBox.
|
PdfFormXObject |
put(PdfName key, PdfObject value)
Puts the value into Image XObject dictionary and associates it with the specified key.
|
PdfFormXObject |
setBBox(PdfArray bBox)
Sets Form XObject's BBox, PdfName.BBox key.
|
PdfFormXObject |
setGroup(PdfTransparencyGroup transparency)
Sets a group attributes dictionary indicating that the contents of the form XObject shall be treated as a group and specifying the attributes of that group.
|
PdfFormXObject |
setMarkStyle(PdfString markStyle)
Sets a text string representing the printer’s mark in human-readable form.
|
PdfFormXObject |
setProcessColorModel(PdfName model)
Sets process color model for trap network appearance, PdfName.PCM key.
|
PdfFormXObject |
setSeparationColorNames(PdfArray colorNames)
Sets separation color names for the trap network appearance, PdfName.SeparationColorNames key.
|
PdfFormXObject |
setTrapRegions(PdfArray regions)
Sets an array of TrapRegion objects defining the page’s trapping zones and the associated trapping parameters, as described in Adobe Technical Note #5620, Portable Job Ticket Format.
|
PdfFormXObject |
setTrapStyles(PdfString trapStyles)
Sets a human-readable text string that described this trap network to the user.
|
addAssociatedFile, calculateProportionallyFitRectangleWithHeight, calculateProportionallyFitRectangleWithWidth, getAssociatedFiles, isWrappedObjectMustBeIndirect, makeXObject, setLayer
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
protected PdfResources resources
public PdfFormXObject(Rectangle bBox)
bBox
- the form XObject’s bounding box.
public PdfFormXObject(PdfStream pdfStream)
PdfFormXObject
instance by PdfStream
. Note, this constructor doesn't perform any additional checks
pdfStream
- PdfStream
with Form XObject.
PdfXObject.makeXObject(PdfStream)
public PdfFormXObject(PdfPage page)
page
- an instance of PdfPage
public PdfFormXObject(WmfImageData image, PdfDocument pdfDocument)
WmfImageData
. Unlike other images, WmfImageData
images are represented as PdfFormXObject
, not as PdfImageXObject
.
image
- image to create form object from
pdfDocument
- document instance which is needed for writing form stream contents
public static Rectangle calculateBBoxMultipliedByMatrix(PdfFormXObject form)
For mor information see paragraph 8.10.1 in ISO-32000-1.
form
- the object for which calculate the coordinates of the bBox
Rectangle
public PdfResources getResources()
PdfResources
of the Form XObject. Note, if there is no resources, a new instance will be created.
PdfResources
.
public PdfArray getBBox()
PdfName.BBox
key.
public PdfFormXObject setBBox(PdfArray bBox)
PdfName.BBox
key.
public PdfFormXObject setGroup(PdfTransparencyGroup transparency)
PdfName.Group
key.
transparency
- instance of PdfTransparencyGroup
.
PdfTransparencyGroup
public float getWidth()
getWidth
in class PdfXObject
public float getHeight()
getHeight
in class PdfXObject
public void flush()
PdfObject
behind this wrapper, you have to ensure that this object is added to the document, i.e. it has an indirect reference. Basically this means that before flushing you need to explicitly call PdfObjectWrapper.makeIndirect(PdfDocument)
. For example: wrapperInstance.makeIndirect(document).flush(); Note that not every wrapper require this, only those that have such warning in documentation.
flush
in class PdfObjectWrapper<PdfStream>
public PdfFormXObject setProcessColorModel(PdfName model)
PdfName.PCM
key.
model
- shall be one of the valid values: PdfName.DeviceGray
, PdfName.DeviceRGB
, PdfName.DeviceCMYK
, PdfName.DeviceCMY
, PdfName.DeviceRGBK
, and PdfName.DeviceN
.
public PdfName getProcessColorModel()
PdfName.PCM
key.
PdfName
instance, possible values: PdfName.DeviceGray
, PdfName.DeviceRGB
, PdfName.DeviceCMYK
, PdfName.DeviceCMY
, PdfName.DeviceRGBK
, and PdfName.DeviceN
.
public PdfFormXObject setSeparationColorNames(PdfArray colorNames)
PdfName.SeparationColorNames
key.
colorNames
- an array of names identifying the colorants that were assumed when the trap network appearance was created.
public PdfArray getSeparationColorNames()
PdfName.SeparationColorNames
key.
PdfArray
of names identifying the colorants.
public PdfFormXObject setTrapRegions(PdfArray regions)
PdfName.TrapRegions
key.
regions
- A PdfArray
of indirect references to TrapRegion objects.
public PdfArray getTrapRegions()
PdfName.TrapRegions
key.
PdfArray
of indirect references to TrapRegion objects.
public PdfFormXObject setTrapStyles(PdfString trapStyles)
PdfName.TrapStyles
key.
trapStyles
- a PdfString
value.
public PdfString getTrapStyles()
PdfName.TrapStyles
key.
PdfString
value.
public PdfFormXObject setMarkStyle(PdfString markStyle)
markStyle
- a string value.
public PdfString getMarkStyle()
public PdfFormXObject put(PdfName key, PdfObject value)
key
- key to insert or to override
value
- the value to associate with the specified key
Copyright © 1998–2023 iText Group NV. All rights reserved.