iText 8.0.4 API
iText.Kernel.Pdf.Xobject.PdfFormXObject Class Reference

A wrapper for Form XObject. More...

Inheritance diagram for iText.Kernel.Pdf.Xobject.PdfFormXObject:
iText.Kernel.Pdf.Xobject.PdfXObject iText.Kernel.Pdf.PdfObjectWrapper< PdfStream > iText.Svg.Xobject.SvgImageXObject

Public Member Functions

  PdfFormXObject (Rectangle bBox)
  Creates a new instance of Form XObject. More...
 
  PdfFormXObject (PdfStream pdfStream)
  Create PdfFormXObject instance by iText.Kernel.Pdf.PdfStream. More...
 
  PdfFormXObject (PdfPage page)
  Creates form XObject from page content. More...
 
  PdfFormXObject (WmfImageData image, PdfDocument pdfDocument)
  Creates a form XObject from iText.Kernel.Pdf.Canvas.Wmf.WmfImageData. More...
 
virtual PdfResources  GetResources ()
  Gets iText.Kernel.Pdf.PdfResources of the Form XObject. More...
 
virtual PdfArray  GetBBox ()
  Gets Form XObject's BBox, iText.Kernel.Pdf.PdfName.BBox key. More...
 
virtual iText.Kernel.Pdf.Xobject.PdfFormXObject  SetBBox (PdfArray bBox)
  Sets Form XObject's BBox, iText.Kernel.Pdf.PdfName.BBox key. More...
 
virtual iText.Kernel.Pdf.Xobject.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. More...
 
override float  GetWidth ()
  Gets width based on XObject's BBox. More...
 
override float  GetHeight ()
  Gets height based on XObject's BBox. More...
 
override void  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. More...
 
virtual iText.Kernel.Pdf.Xobject.PdfFormXObject  SetProcessColorModel (PdfName model)
  Sets process color model for trap network appearance, iText.Kernel.Pdf.PdfName.PCM key. More...
 
virtual PdfName  GetProcessColorModel ()
  Gets process color model of trap network appearance, iText.Kernel.Pdf.PdfName.PCM key. More...
 
virtual iText.Kernel.Pdf.Xobject.PdfFormXObject  SetSeparationColorNames (PdfArray colorNames)
  Sets separation color names for the trap network appearance, iText.Kernel.Pdf.PdfName.SeparationColorNames key. More...
 
virtual PdfArray  GetSeparationColorNames ()
  Gets separation color names of trap network appearance, iText.Kernel.Pdf.PdfName.SeparationColorNames key. More...
 
virtual iText.Kernel.Pdf.Xobject.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. More...
 
virtual 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. More...
 
virtual iText.Kernel.Pdf.Xobject.PdfFormXObject  SetTrapStyles (PdfString trapStyles)
  Sets a human-readable text string that described this trap network to the user. More...
 
virtual PdfString  GetTrapStyles ()
  Gets a human-readable text string that described this trap network to the user. More...
 
virtual iText.Kernel.Pdf.Xobject.PdfFormXObject  SetMarkStyle (PdfString markStyle)
  Sets a text string representing the printer’s mark in human-readable form. More...
 
virtual PdfString  GetMarkStyle ()
  Gets a text string representing the printer’s mark in human-readable form. More...
 
virtual iText.Kernel.Pdf.Xobject.PdfFormXObject  Put (PdfName key, PdfObject value)
  Puts the value into Image XObject dictionary and associates it with the specified key. More...
 
- Public Member Functions inherited from iText.Kernel.Pdf.Xobject.PdfXObject
virtual void  SetLayer (IPdfOCG layer)
  Sets the layer this XObject belongs to. More...
 
virtual void  AddAssociatedFile (PdfFileSpec fs)
  Adds file associated with PDF XObject and identifies the relationship between them. More...
 
virtual PdfArray  GetAssociatedFiles (bool create)
  Returns files associated with XObject. More...
 
- Public Member Functions inherited from iText.Kernel.Pdf.PdfObjectWrapper< PdfStream >
virtual T  GetPdfObject ()
 
virtual iText.Kernel.Pdf.PdfObjectWrapper< T >  MakeIndirect (PdfDocument document, PdfIndirectReference reference)
  Marks object behind wrapper to be saved as indirect. More...
 
virtual iText.Kernel.Pdf.PdfObjectWrapper< T >  MakeIndirect (PdfDocument document)
  Marks object behind wrapper to be saved as indirect. More...
 
virtual iText.Kernel.Pdf.PdfObjectWrapper< T >  SetModified ()
 
virtual bool  IsFlushed ()
 

Static Public Member Functions

static Rectangle  CalculateBBoxMultipliedByMatrix (iText.Kernel.Pdf.Xobject.PdfFormXObject form)
  Calculates the coordinates of the xObject BBox multiplied by the Matrix field. More...
 
- Static Public Member Functions inherited from iText.Kernel.Pdf.Xobject.PdfXObject
static iText.Kernel.Pdf.Xobject.PdfXObject  MakeXObject (PdfStream stream)
  Create PdfFormXObject or PdfImageXObject by iText.Kernel.Pdf.PdfStream. More...
 
static Rectangle  CalculateProportionallyFitRectangleWithWidth (iText.Kernel.Pdf.Xobject.PdfXObject xObject, float x, float y, float width)
  Calculates a rectangle with the specified coordinates and width, and the height is calculated in such a way that the original proportions of the xObject do not change. More...
 
static Rectangle  CalculateProportionallyFitRectangleWithHeight (iText.Kernel.Pdf.Xobject.PdfXObject xObject, float x, float y, float height)
  Calculates a rectangle with the specified coordinates and height, and the width is calculated in such a way that the original proportions of the xObject do not change. More...
 

Detailed Description

A wrapper for Form XObject.

A wrapper for Form XObject. ISO 32000-1, 8.10 FormXObjects.

Constructor & Destructor Documentation

◆ PdfFormXObject() [1/4]

iText.Kernel.Pdf.Xobject.PdfFormXObject.PdfFormXObject ( Rectangle  bBox )
inline

Creates a new instance of Form XObject.

Parameters
bBox the form XObject’s bounding box.

◆ PdfFormXObject() [2/4]

iText.Kernel.Pdf.Xobject.PdfFormXObject.PdfFormXObject ( PdfStream  pdfStream )
inline

Create PdfFormXObject instance by iText.Kernel.Pdf.PdfStream.

Create PdfFormXObject instance by iText.Kernel.Pdf.PdfStream. Note, this constructor doesn't perform any additional checks

Parameters
pdfStream

iText.Kernel.Pdf.PdfStream with Form XObject.

See also
PdfXObject.MakeXObject(iText.Kernel.Pdf.PdfStream)

◆ PdfFormXObject() [3/4]

iText.Kernel.Pdf.Xobject.PdfFormXObject.PdfFormXObject ( PdfPage  page )
inline

Creates form XObject from page content.

Creates form XObject from page content. The page shall be from the document, to which FormXObject will be added.

Parameters
page an instance of iText.Kernel.Pdf.PdfPage

◆ PdfFormXObject() [4/4]

iText.Kernel.Pdf.Xobject.PdfFormXObject.PdfFormXObject ( WmfImageData  image,
PdfDocument  pdfDocument 
)
inline

Creates a form XObject from iText.Kernel.Pdf.Canvas.Wmf.WmfImageData.

Creates a form XObject from iText.Kernel.Pdf.Canvas.Wmf.WmfImageData. Unlike other images, iText.Kernel.Pdf.Canvas.Wmf.WmfImageData images are represented as PdfFormXObject , not as PdfImageXObject.

Parameters
image image to create form object from
pdfDocument document instance which is needed for writing form stream contents

Member Function Documentation

◆ CalculateBBoxMultipliedByMatrix()

static Rectangle iText.Kernel.Pdf.Xobject.PdfFormXObject.CalculateBBoxMultipliedByMatrix ( iText.Kernel.Pdf.Xobject.PdfFormXObject  form )
inlinestatic

Calculates the coordinates of the xObject BBox multiplied by the Matrix field.

Calculates the coordinates of the xObject BBox multiplied by the Matrix field.

For mor information see paragraph 8.10.1 in ISO-32000-1.

Parameters
form the object for which calculate the coordinates of the bBox
Returns
the bBox iText.Kernel.Geom.Rectangle

◆ Flush()

override void iText.Kernel.Pdf.Xobject.PdfFormXObject.Flush ( )
inlinevirtual

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.

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 iText.Kernel.Pdf.PdfObjectWrapper.MakeIndirect(iText.Kernel.Pdf.PdfDocument). For example: wrapperInstance.makeIndirect(document).flush(); Note that not every wrapper require this, only those that have such warning in documentation.

Reimplemented from iText.Kernel.Pdf.PdfObjectWrapper< PdfStream >.

◆ GetBBox()

virtual PdfArray iText.Kernel.Pdf.Xobject.PdfFormXObject.GetBBox ( )
inlinevirtual

Gets Form XObject's BBox, iText.Kernel.Pdf.PdfName.BBox key.

Returns
a iText.Kernel.Pdf.PdfArray , that represents iText.Kernel.Geom.Rectangle.

◆ GetHeight()

override float iText.Kernel.Pdf.Xobject.PdfFormXObject.GetHeight ( )
inlinevirtual

Gets height based on XObject's BBox.

Returns
float value.

Reimplemented from iText.Kernel.Pdf.Xobject.PdfXObject.

◆ GetMarkStyle()

virtual PdfString iText.Kernel.Pdf.Xobject.PdfFormXObject.GetMarkStyle ( )
inlinevirtual

Gets a text string representing the printer’s mark in human-readable form.

Returns
a string value.

◆ GetProcessColorModel()

virtual PdfName iText.Kernel.Pdf.Xobject.PdfFormXObject.GetProcessColorModel ( )
inlinevirtual

Gets process color model of trap network appearance, iText.Kernel.Pdf.PdfName.PCM key.

Returns
a iText.Kernel.Pdf.PdfName instance, possible values: iText.Kernel.Pdf.PdfName.DeviceGray , iText.Kernel.Pdf.PdfName.DeviceRGB , iText.Kernel.Pdf.PdfName.DeviceCMYK , iText.Kernel.Pdf.PdfName.DeviceCMY , iText.Kernel.Pdf.PdfName.DeviceRGBK , and iText.Kernel.Pdf.PdfName.DeviceN.

◆ GetResources()

virtual PdfResources iText.Kernel.Pdf.Xobject.PdfFormXObject.GetResources ( )
inlinevirtual

Gets iText.Kernel.Pdf.PdfResources of the Form XObject.

Gets iText.Kernel.Pdf.PdfResources of the Form XObject. Note, if there is no resources, a new instance will be created.

Returns
not null instance of iText.Kernel.Pdf.PdfResources.

◆ GetSeparationColorNames()

virtual PdfArray iText.Kernel.Pdf.Xobject.PdfFormXObject.GetSeparationColorNames ( )
inlinevirtual

Gets separation color names of trap network appearance, iText.Kernel.Pdf.PdfName.SeparationColorNames key.

Returns
an iText.Kernel.Pdf.PdfArray of names identifying the colorants.

◆ GetTrapRegions()

virtual PdfArray iText.Kernel.Pdf.Xobject.PdfFormXObject.GetTrapRegions ( )
inlinevirtual

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.

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. iText.Kernel.Pdf.PdfName.TrapRegions key.

Returns
A iText.Kernel.Pdf.PdfArray of indirect references to TrapRegion objects.

◆ GetTrapStyles()

virtual PdfString iText.Kernel.Pdf.Xobject.PdfFormXObject.GetTrapStyles ( )
inlinevirtual

Gets a human-readable text string that described this trap network to the user.

Gets a human-readable text string that described this trap network to the user. iText.Kernel.Pdf.PdfName.TrapStyles key.

Returns
a iText.Kernel.Pdf.PdfString value.

◆ GetWidth()

override float iText.Kernel.Pdf.Xobject.PdfFormXObject.GetWidth ( )
inlinevirtual

Gets width based on XObject's BBox.

Returns
float value.

Reimplemented from iText.Kernel.Pdf.Xobject.PdfXObject.

◆ Put()

virtual iText.Kernel.Pdf.Xobject.PdfFormXObject iText.Kernel.Pdf.Xobject.PdfFormXObject.Put ( PdfName  key,
PdfObject  value 
)
inlinevirtual

Puts the value into Image XObject dictionary and associates it with the specified key.

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.

Parameters
key key to insert or to override
value the value to associate with the specified key
Returns
object itself.

◆ SetBBox()

virtual iText.Kernel.Pdf.Xobject.PdfFormXObject iText.Kernel.Pdf.Xobject.PdfFormXObject.SetBBox ( PdfArray  bBox )
inlinevirtual

Sets Form XObject's BBox, iText.Kernel.Pdf.PdfName.BBox key.

Parameters
bBox a iText.Kernel.Pdf.PdfArray , that represents iText.Kernel.Geom.Rectangle.
Returns
object itself.

◆ SetGroup()

virtual iText.Kernel.Pdf.Xobject.PdfFormXObject iText.Kernel.Pdf.Xobject.PdfFormXObject.SetGroup ( PdfTransparencyGroup  transparency )
inlinevirtual

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.

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. iText.Kernel.Pdf.PdfName.Group key.

Parameters
transparency instance of PdfTransparencyGroup.
Returns
object itself.
See also
PdfTransparencyGroup

◆ SetMarkStyle()

virtual iText.Kernel.Pdf.Xobject.PdfFormXObject iText.Kernel.Pdf.Xobject.PdfFormXObject.SetMarkStyle ( PdfString  markStyle )
inlinevirtual

Sets a text string representing the printer’s mark in human-readable form.

Parameters
markStyle a string value.
Returns
object itself.

◆ SetProcessColorModel()

virtual iText.Kernel.Pdf.Xobject.PdfFormXObject iText.Kernel.Pdf.Xobject.PdfFormXObject.SetProcessColorModel ( PdfName  model )
inlinevirtual

Sets process color model for trap network appearance, iText.Kernel.Pdf.PdfName.PCM key.

Parameters
model shall be one of the valid values: iText.Kernel.Pdf.PdfName.DeviceGray , iText.Kernel.Pdf.PdfName.DeviceRGB , iText.Kernel.Pdf.PdfName.DeviceCMYK , iText.Kernel.Pdf.PdfName.DeviceCMY , iText.Kernel.Pdf.PdfName.DeviceRGBK , and iText.Kernel.Pdf.PdfName.DeviceN.
Returns
object itself.

◆ SetSeparationColorNames()

virtual iText.Kernel.Pdf.Xobject.PdfFormXObject iText.Kernel.Pdf.Xobject.PdfFormXObject.SetSeparationColorNames ( PdfArray  colorNames )
inlinevirtual

Sets separation color names for the trap network appearance, iText.Kernel.Pdf.PdfName.SeparationColorNames key.

Parameters
colorNames an array of names identifying the colorants that were assumed when the trap network appearance was created.
Returns
object itself.

◆ SetTrapRegions()

virtual iText.Kernel.Pdf.Xobject.PdfFormXObject iText.Kernel.Pdf.Xobject.PdfFormXObject.SetTrapRegions ( PdfArray  regions )
inlinevirtual

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.

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. iText.Kernel.Pdf.PdfName.TrapRegions key.

Parameters
regions A iText.Kernel.Pdf.PdfArray of indirect references to TrapRegion objects.
Returns
object itself.

◆ SetTrapStyles()

virtual iText.Kernel.Pdf.Xobject.PdfFormXObject iText.Kernel.Pdf.Xobject.PdfFormXObject.SetTrapStyles ( PdfString  trapStyles )
inlinevirtual

Sets a human-readable text string that described this trap network to the user.

Sets a human-readable text string that described this trap network to the user. iText.Kernel.Pdf.PdfName.TrapStyles key.

Parameters
trapStyles a iText.Kernel.Pdf.PdfString value.
Returns
object itself.