Class PdfFormXObject
A wrapper for Form XObject.
public class PdfFormXObject : PdfXObject
- Inheritance
-
PdfFormXObject
- Derived
- Inherited Members
Remarks
A wrapper for Form XObject. ISO 32000-1, 8.10 FormXObjects.
Constructors
PdfFormXObject(Rectangle)
Creates a new instance of Form XObject.
public PdfFormXObject(Rectangle bBox)
Parameters
bBox
Rectanglethe form XObject’s bounding box.
PdfFormXObject(WmfImageData, PdfDocument)
Creates a form XObject from WmfImageData.
public PdfFormXObject(WmfImageData image, PdfDocument pdfDocument)
Parameters
image
WmfImageDataimage to create form object from
pdfDocument
PdfDocumentdocument instance which is needed for writing form stream contents
Remarks
Creates a form XObject from WmfImageData. Unlike other images, WmfImageData images are represented as PdfFormXObject , not as PdfImageXObject.
PdfFormXObject(PdfPage)
Creates form XObject from page content.
public PdfFormXObject(PdfPage page)
Parameters
Remarks
Creates form XObject from page content. The page shall be from the document, to which FormXObject will be added.
PdfFormXObject(PdfStream)
Create PdfFormXObject instance by PdfStream.
public PdfFormXObject(PdfStream pdfStream)
Parameters
Remarks
Create PdfFormXObject instance by PdfStream. Note, this constructor doesn't perform any additional checks
- See Also
Fields
resources
protected PdfResources resources
Field Value
Methods
CalculateBBoxMultipliedByMatrix(PdfFormXObject)
Calculates the coordinates of the xObject BBox multiplied by the Matrix field.
public static Rectangle CalculateBBoxMultipliedByMatrix(PdfFormXObject form)
Parameters
form
PdfFormXObjectthe object for which calculate the coordinates of the bBox
Returns
Remarks
Calculates the coordinates of the xObject BBox multiplied by the Matrix field.
For mor information see paragraph 8.10.1 in ISO-32000-1.Flush()
To manually flush a
PdfObject
behind this wrapper, you have to ensure
that this object is added to the document, i.e. it has an indirect reference.
public override void Flush()
Remarks
To manually flush a
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
MakeIndirect(PdfDocument).
For example: wrapperInstance.makeIndirect(document).flush();
Note that not every wrapper require this, only those that have such warning in documentation.
GetBBox()
Gets Form XObject's BBox, BBox key.
public virtual PdfArray GetBBox()
Returns
GetHeight()
Gets height based on XObject's BBox.
public override float GetHeight()
Returns
- float
float value.
GetMarkStyle()
Gets a text string representing the printer’s mark in human-readable form.
public virtual PdfString GetMarkStyle()
Returns
- PdfString
a string value.
GetProcessColorModel()
Gets process color model of trap network appearance, PCM key.
public virtual PdfName GetProcessColorModel()
Returns
- PdfName
a PdfName instance, possible values: DeviceGray , DeviceRGB , DeviceCMYK , DeviceCMY , DeviceRGBK , and DeviceN.
GetResources()
Gets PdfResources of the Form XObject.
public virtual PdfResources GetResources()
Returns
- PdfResources
not null instance of PdfResources.
Remarks
Gets PdfResources of the Form XObject. Note, if there is no resources, a new instance will be created.
GetSeparationColorNames()
Gets separation color names of trap network appearance, SeparationColorNames key.
public virtual PdfArray GetSeparationColorNames()
Returns
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.
public virtual PdfArray GetTrapRegions()
Returns
Remarks
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. TrapRegions key.
GetTrapStyles()
Gets a human-readable text string that described this trap network to the user.
public virtual PdfString GetTrapStyles()
Returns
Remarks
Gets a human-readable text string that described this trap network to the user. TrapStyles key.
GetWidth()
Gets width based on XObject's BBox.
public override float GetWidth()
Returns
- float
float value.
Put(PdfName, PdfObject)
Puts the value into Image XObject dictionary and associates it with the specified key.
public virtual PdfFormXObject Put(PdfName key, PdfObject value)
Parameters
key
PdfNamekey to insert or to override
value
PdfObjectthe value to associate with the specified key
Returns
- PdfFormXObject
object itself.
Remarks
Puts the value into Image XObject dictionary and associates it with the specified key. If the key is already present, it will override the old value with the specified one.
SetBBox(PdfArray)
Sets Form XObject's BBox, BBox key.
public virtual PdfFormXObject SetBBox(PdfArray bBox)
Parameters
Returns
- PdfFormXObject
object itself.
SetGroup(PdfTransparencyGroup)
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.
public virtual PdfFormXObject SetGroup(PdfTransparencyGroup transparency)
Parameters
transparency
PdfTransparencyGroupinstance of PdfTransparencyGroup.
Returns
- PdfFormXObject
object itself.
Remarks
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. Group key.
- See Also
SetMarkStyle(PdfString)
Sets a text string representing the printer’s mark in human-readable form.
public virtual PdfFormXObject SetMarkStyle(PdfString markStyle)
Parameters
markStyle
PdfStringa string value.
Returns
- PdfFormXObject
object itself.
SetProcessColorModel(PdfName)
Sets process color model for trap network appearance, PCM key.
public virtual PdfFormXObject SetProcessColorModel(PdfName model)
Parameters
model
PdfNameshall be one of the valid values: DeviceGray , DeviceRGB , DeviceCMYK , DeviceCMY , DeviceRGBK , and DeviceN.
Returns
- PdfFormXObject
object itself.
SetSeparationColorNames(PdfArray)
Sets separation color names for the trap network appearance, SeparationColorNames key.
public virtual PdfFormXObject SetSeparationColorNames(PdfArray colorNames)
Parameters
colorNames
PdfArrayan array of names identifying the colorants that were assumed when the trap network appearance was created.
Returns
- PdfFormXObject
object itself.
SetTrapRegions(PdfArray)
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.
public virtual PdfFormXObject SetTrapRegions(PdfArray regions)
Parameters
Returns
- PdfFormXObject
object itself.
Remarks
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. TrapRegions key.
SetTrapStyles(PdfString)
Sets a human-readable text string that described this trap network to the user.
public virtual PdfFormXObject SetTrapStyles(PdfString trapStyles)
Parameters
Returns
- PdfFormXObject
object itself.
Remarks
Sets a human-readable text string that described this trap network to the user. TrapStyles key.