Foxit PDF SDK
fsdk.FormXObject Class Reference

Public Member Functions

def GetGraphicsObjects ()
 Get graphics objects that associated with current form XObject.
More...
 
def GetStream ()
 Get stream.
More...
 
def ImportPageContent (source_page, is_annots_included)
 Import page content from a specified PDF page to current form XObject.
More...
 

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 fsdk.FormXObject is derived from class GraphicsObject . It offers functions to get/set form XObject's data.
To create a new form XObject graphics object, please use function fsdk.PathObjectCreate and then import page content to the new form XObject, or insert new graphics object to form XObject through fsdk.GraphicsObjects object returned by function fsdk.FormXObject.GetGraphicsObjects .

See also
GraphicsObject

Member Function Documentation

◆ GetGraphicsObjects()

def fsdk.FormXObject.GetGraphicsObjects ( )

Get graphics objects that associated with current form XObject.

Returns
A fsdk.GraphicsObjects object.

◆ GetStream()

def fsdk.FormXObject.GetStream ( )

Get stream.

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

◆ ImportPageContent()

def fsdk.FormXObject.ImportPageContent (   source_page,
  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_includedtrue means annotations should be included with the content of parameter source_page. false means annotations should be ignored from the content of parameter source_page.
Returns
true means success, while false means failure.
Note
When this function succeeds, function fsdk.GraphicsObjects.GenerateContent should be called. Please refer to function fsdk.GraphicsObjects.GenerateContent for more details.