Foxit PDF SDK
FSFormXObject Class Reference
Inheritance diagram for FSFormXObject:
FSGraphicsObject

Instance Methods

(FSGraphicsObjects *) - getGraphicsObjects
 Get graphics objects that associated with current form XObject.
More...
 
(FSPDFStream *) - getStream
 Get stream.
More...
 
(BOOL) - importPageContent:is_annots_included:
 Import page content from a specified PDF page to current form XObject.
More...
 
- Instance Methods inherited from FSGraphicsObject
(BOOL) - addClipPath:fill_mode:
 Add a path for clipping.
More...
 
(BOOL) - addClipTextObject:
 Add text object for clipping.
More...
 
(BOOL) - clearClips
 Clear all clips.
More...
 
(FSGraphicsObject *) - clone
 Clone a new graphics object.
More...
 
(FSPath *) - getClipPath:
 Get a path clip by index.
More...
 
(int) - getClipPathCount
 Get the count of path clip.
More...
 
(FSFillMode- getClipPathFillMode:
 Get the fill mode of a path clip by index.
More...
 
(FSTextObject *) - getClipTextObject:
 Get the text object of a text clip by index.
More...
 
(int) - getClipTextObjectCount
 Get the count of text clip.
More...
 
(FSFormXObject *) - getFormXObject
 Get the form XObject graphics object if current graphics object represents a form XObject object.
More...
 
(FSImageObject *) - getImageObject
 Get the image graphics object if current graphics object represents an image object.
More...
 
(FSLayerNodeArray *) - getLayers:
 Get all the layers which are associated with current graphics object.
More...
 
(FSMarkedContent *) - getMarkedContent
 Get marked content object.
More...
 
(FSPathObject *) - getPathObject
 Get the path graphics object if current graphics object represents a path object.
More...
 
(FSRectF *) - getRect
 Get the rectangle of current graphics object.
More...
 
(FSShadingObject *) - getShadingObject
 Get the shading graphics object if current graphics object represents a shading object.
More...
 
(FSTextObject *) - getTextObject
 Get the text graphics object if current graphics object represents a text object.
More...
 
(FSGraphicsObjectType- getType
 Get the type of current graphics object.
More...
 
(BOOL) - hasTransparency
 Check whether current graphics object has transparency or not.
More...
 
(BOOL) - removeClipPath:
 Remove a path clip by index.
More...
 
(BOOL) - removeClipTextObject:
 Remove a text clip by index for clipping.
More...
 
(void) - rotate:
 Rotate current graphics object from current state with specified angle degree in clockwise.
More...
 
(BOOL) - transform:need_transform_clippath:
 Transform current graphics object.
More...
 

Class Methods

(FSFormXObject *) + create:
 Create a new form XObject graphics object.
More...
 

Additional Inherited Members

- Properties inherited from FSGraphicsObject
FSGraphicsObjectBlendMode blendMode
 Get or Set the blend mode for transparent imaging model.

 
FSRectFclipRect
 Get or Set clip rectangle.

 
FSColorStatecolorState
 Get or Set color state.
More...
 
unsigned int fillColor
 Get or Set the fill color.
More...
 
float fillOpacity
 Get or Set the opacity value for painting operations other than stroking.

 
FSGraphStategraphState
 Get or Set graph state.
More...
 
FSMatrix2Dmatrix
 Get or Set matrix.

 
unsigned int strokeColor
 Get or Set the stroke color.
More...
 
float strokeOpacity
 Get or Set opacity value for stroke painting operations for paths and glyph outlines.

 

Detailed Description

A form XObject is not only a graphics object, but also a container. A form XObject consists of a set of graphics objects or sub form XObjects. Form XObject is a kind of PDF graphics object, so class FSFormXObject is derived from class FSGraphicsObject . It offers functions to get/set form XObject's data.
To create a new form XObject graphics object, please use function PathObject::create and then import page content to the new form XObject, or insert new graphics object to form XObject through FSGraphicsObjects object returned by function FormXObject::getGraphicsObjects.

See also
FSGraphicsObject

Method Documentation

◆ create:()

+ (FSFormXObject *) create: (FSPDFDoc*)  document

Create a new form XObject graphics object.

The newly created form XObject graphics object does not have any data yet. Then, setting functions can be called to set data to the new form XObject graphics object.

Parameters
[in]documentA valid PDF document object. The new form XObject graphics object should be inserted to one page of this PDF document then.
Returns
A new form XObject. If there is any error, this function will return nil.

◆ getGraphicsObjects()

- (FSGraphicsObjects *) getGraphicsObjects

Get graphics objects that associated with current form XObject.

Returns
A FSGraphicsObjects object.

◆ getStream()

- (FSPDFStream *) getStream

Get stream.

Returns
A FSPDFStream that represents the stream data of current form XObject. If there is any error, this function will return nil.

◆ importPageContent:is_annots_included:()

- (BOOL) importPageContent: (FSPDFPage*)  source_page
is_annots_included: (BOOL)  is_annots_included 

Import page content from a specified PDF page to current form XObject.

If this function succeeds, the boundary box of current form XObject will be the same as page's size.

Parameters
[in]source_pageA valid PDF page object that represents the source PDF page whose content will be imported to current form XObject.
[in]is_annots_includedYES means annotations should be included with the content of parameter source_page. NO means annotations should be ignored from the content of parameter source_page.
Returns
YES means success, while NO means failure.
Note
When this function succeeds, function GraphicsObjects::generateContent should be called. Please refer to function GraphicsObjects::generateContent for more details.