Definitions for access to PDF Page Objects, PDF Marked Content, and PDF Layers.
Definitions and functions in this module are included in fpdf_pageobjects_r.h, fpdf_pageobjects_w.h, fpdf_markedcontent_r.h, fpdf_markedcontent_w.h, fpdf_layer_r.h, and fpdf_layer_w.h.
Module: PDFPageObjects
License Identifier: PDFPageObjects/All
Available License Right: Reading/Writing
For License Right Reading, see fpdf_pageobjects_r.h, fpdf_markedcontent_r.h, and fpdf_layer_r.h.
For License Right Writing, see fpdf_pageobjects_w.h, fpdf_markedcontent_w.h, and fpdf_layer_w.h.
More...
Classes | |
struct | FSPDF_LAYER |
Handle type to PDF layer. More... | |
struct | FSPDF_LAYERNODE |
Structure for PDF layer nodes. More... | |
struct | FSPDF_LAYERUSAGE_ZOOMDATA |
Param structure for PDF layer zoom usage. More... | |
struct | FSPDF_LAYERUSAGE_PRINTDATA |
Param structure for PDF layer print usage. More... | |
struct | FSPDF_MARKEDCONTENT |
Handle type to PDF marked-content object. More... | |
struct | FSPDF_PAGEOBJECT |
Handle type to page object. More... | |
struct | FSPDF_PAGEOBJECTS |
Handle type to page objects, which indicates a set of page objects. More... | |
struct | FSPDF_GRAPHSTATE |
Structure for PDF graph states. More... | |
struct | FSPDF_TEXTSTATE |
Structure for PDF text states. More... | |
Functions | |
FS_RESULT | FSPDF_LayerNode_Init (FSPDF_LAYERNODE *layers) |
Helper function to initialize a PDF layer node. More... | |
FS_RESULT | FSPDF_LayerNode_Clear (FSPDF_LAYERNODE *layers) |
Helper function to clear a PDF layer node. More... | |
FS_RESULT | FSPDF_Doc_EnumLayers (FSCRT_DOCUMENT document, FSPDF_LAYERNODE *layers) |
Enum all PDF Layers. More... | |
FS_RESULT | FSPDF_Layer_GetName (FSPDF_LAYER layer, FSCRT_BSTR *name) |
Get the name of a PDF layer. More... | |
FS_RESULT | FSPDF_Layer_IsInPage (FSCRT_PAGE page, FSPDF_LAYER layer, FS_BOOL *isInPage) |
Check whether a PDF layer is in a given page or not. More... | |
FS_RESULT | FSPDF_Layer_HasIntent (FSPDF_LAYER layer, const FSCRT_BSTR *intent, FS_BOOL *hasIntent) |
Check whether a PDF layer has a specific intent. More... | |
FS_RESULT | FSPDF_Layer_GetApplicationUsage (FSPDF_LAYER layer, FS_INT32 usageType, FS_LPVOID param) |
Get the application usage and its parameter of a PDF layer. More... | |
FS_RESULT | FSPDF_Layer_EnumeratePageObject (FSPDF_LAYER layer, FSCRT_PAGE page, FSCRT_POSITION *position, FSPDF_PAGEOBJECT *pageObj) |
Enumerate page objects and retrieve a page object which is related with a specific layer. More... | |
FS_RESULT | FSPDF_LayerContext_Create (FSCRT_DOCUMENT document, FS_INT32 usType, FSPDF_LAYERCONTEXT *context) |
Create a PDF layer context with a given type. More... | |
FS_RESULT | FSPDF_LayerContext_Release (FSPDF_LAYERCONTEXT context) |
Release a PDF layer context. More... | |
FS_RESULT | FSPDF_LayerContext_GetDocument (FSPDF_LAYERCONTEXT context, FSCRT_DOCUMENT *document) |
Retrieve a PDF document which owns a PDF layer context. More... | |
FS_RESULT | FSPDF_LayerContext_GetUsageType (FSPDF_LAYERCONTEXT context, FS_INT32 *usType) |
Get usage type of a PDF layer context. More... | |
FS_RESULT | FSPDF_LayerContext_Reset (FSPDF_LAYERCONTEXT context) |
Reset a PDF layer context. More... | |
FS_RESULT | FSPDF_LayerContext_CopyStates (FSPDF_LAYERCONTEXT destContext, FSPDF_LAYERCONTEXT srcContext) |
Copy a PDF layer context state from another PDF layer context. More... | |
FS_RESULT | FSPDF_LayerContext_MergeStates (FSPDF_LAYERCONTEXT destContext, FSPDF_LAYERCONTEXT srcContext) |
Merge state from source PDF layer context to destination. More... | |
FS_RESULT | FSPDF_LayerContext_IsVisible (FSPDF_LAYERCONTEXT context, FSPDF_LAYER layer, FS_BOOL *visible) |
Check whether a PDF layer is visible or not. More... | |
FS_RESULT | FSPDF_LayerContext_SetVisible (FSPDF_LAYERCONTEXT context, FSPDF_LAYER layer, FS_BOOL visible) |
Change the visibility state of a PDF layer. More... | |
FS_RESULT | FSPDF_Layer_SetName (FSPDF_LAYER layer, const FSCRT_BSTR *name) |
Set the name of a PDF layer. More... | |
FS_RESULT | FSPDF_Doc_SetLayersBaseState (FSCRT_DOCUMENT doc, FS_INT32 state) |
Set the base visible state of PDF layers in the default configuration. More... | |
FS_RESULT | FSPDF_Layer_SetApplicationUsage (FSPDF_LAYER layer, FS_INT32 usageType, FS_LPVOID param) |
Set the application usage of a PDF layer. If some events is triggered, the visibility of PDF layer will be switched. More... | |
FS_RESULT | FSPDF_Layer_RemoveApplicationUsage (FSPDF_LAYER layer, FS_INT32 usageType) |
Remove the application usage of a PDF layer. If some events is triggered, the visibility of PDF layer will be switched. More... | |
FS_RESULT | FSPDF_Doc_AddLayer (FSCRT_DOCUMENT doc, FSCRT_BSTR *layerName, FSPDF_LAYER *layer) |
Add a layer to a PDF document. More... | |
FS_RESULT | FSPDF_Layer_Remove (FSPDF_LAYER layer, FS_DWORD options) |
Remove a layer from the document. More... | |
FS_RESULT | FSPDF_Layer_SetDefaultState (FSPDF_LAYER layer, FS_BOOL state) |
Set the default visible state of a PDF layer in the default configuration. More... | |
FS_RESULT | FSPDF_Layer_AddPageObject (FSPDF_LAYER layer, FSCRT_PAGE page, FSPDF_PAGEOBJECT pageObj) |
Add a page object to a PDF layer. More... | |
FS_RESULT | FSPDF_Layer_RemovePageObject (FSPDF_LAYER layer, FSPDF_PAGEOBJECT pageObj) |
Remove a page object from a PDF layer. More... | |
FS_RESULT | FSPDF_PageObject_GetMarkedContent (FSCRT_PAGE page, FSPDF_PAGEOBJECT pageObj, FSPDF_MARKEDCONTENT *mc) |
Get a marked content object from a page object. More... | |
FS_RESULT | FSPDF_MarkedContent_CountItems (FSCRT_PAGE page, FSPDF_MARKEDCONTENT mc, FS_INT32 *count) |
Get the count of marked content items in the marked content sequence. More... | |
FS_RESULT | FSPDF_MarkedContent_GetTagName (FSCRT_PAGE page, FSPDF_MARKEDCONTENT mc, FS_INT32 index, FSCRT_BSTR *tagName) |
Get the tag name of a specific marked content item. More... | |
FS_RESULT | FSPDF_MarkedContent_HasTag (FSCRT_PAGE page, FSPDF_MARKEDCONTENT mc, const FSCRT_BSTR *tagName, FS_BOOL *bHas) |
Check whether a marked content object has a specified marked content item. More... | |
FS_RESULT | FSPDF_MarkedContent_GetItemParam (FSCRT_PAGE page, FSPDF_MARKEDCONTENT mc, const FSCRT_BSTR *tagName, FS_INT32 *paramType, FS_LPVOID *param) |
Get a parameter type of a parameter value of a specific marked content item. More... | |
FS_RESULT | FSPDF_MarkedContent_AddItem (FSCRT_PAGE page, FSPDF_MARKEDCONTENT mc, const FSCRT_BSTR *tagName, FS_INT32 paramType, FS_LPCVOID param) |
Add a new marked content item to the current marked content object. More... | |
FS_RESULT | FSPDF_MarkedContent_DeleteItem (FSCRT_PAGE page, FSPDF_MARKEDCONTENT mc, const FSCRT_BSTR *tagName) |
Delete a specific marked content item from the current marked content sequence. More... | |
FS_RESULT | FSPDF_Page_GetPageObjects (FSCRT_PAGE page, FSPDF_PAGEOBJECTS *pageObjs) |
Get page objects in a PDF page. More... | |
FS_RESULT | FSPDF_PageObjects_CountObjects (FSCRT_PAGE page, FSPDF_PAGEOBJECTS pageObjs, FS_INT32 typeFilter, FS_INT32 *count) |
Get the count of page objects with specific type. More... | |
FS_RESULT | FSPDF_PageObjects_GetObject (FSCRT_PAGE page, FSPDF_PAGEOBJECTS pageObjs, FS_INT32 typeFilter, FS_INT32 index, FSPDF_PAGEOBJECT *pageObj) |
Get a page object from page objects. More... | |
FS_RESULT | FSPDF_PageObjects_EnumerateObject (FSCRT_PAGE page, FSPDF_PAGEOBJECTS pageObjs, FS_INT32 typeFilter, FSCRT_POSITION *position, FSPDF_PAGEOBJECT *pageObj) |
Enumerate page objects and retrieve a page object at a given position from page objects. More... | |
FS_RESULT | FSPDF_PageObjects_GetObjectIndex (FSCRT_PAGE page, FSPDF_PAGEOBJECTS pageObjs, FSPDF_PAGEOBJECT pageObj, FS_INT32 typeFilter, FS_INT32 *index) |
Get index of a page object. More... | |
FS_RESULT | FSPDF_PageObjects_GetObjectAtPos (FSCRT_PAGE page, FSPDF_PAGEOBJECTS pageObjs, FS_INT32 typeFilter, FS_FLOAT x, FS_FLOAT y, FS_FLOAT tolerance, FSPDF_PAGEOBJECT *pageObj) |
Get a page object at a specific point, in PDF page coordinate system. More... | |
FS_RESULT | FSPDF_PageObjects_GetObjectListAtPos (FSCRT_PAGE page, FS_INT32 typeFilter, FS_FLOAT x, FS_FLOAT y, FS_FLOAT tolerance, FSCRT_ARRAY *pageObjList) |
Get an array of all page objects at a specific point, in PDF page coordinate system. More... | |
FS_RESULT | FSPDF_PageObject_GetType (FSCRT_PAGE page, FSPDF_PAGEOBJECT pageObj, FS_INT32 *type) |
Get type of a page object. More... | |
FS_RESULT | FSPDF_PageObject_GetRect (FSCRT_PAGE page, FSPDF_PAGEOBJECT pageObj, FSCRT_RECTF *rect) |
Get rectangle of a page object. More... | |
FS_RESULT | FSPDF_PageObject_GetMatrix (FSCRT_PAGE page, FSPDF_PAGEOBJECT pageObj, FSCRT_MATRIX *matrix) |
Get matrix of a page object. More... | |
FS_RESULT | FSPDF_PageObject_GetGraphState (FSCRT_PAGE page, FSPDF_PAGEOBJECT pageObj, FSPDF_GRAPHSTATE *graphState) |
Get graph states of a page object . More... | |
FS_RESULT | FSPDF_PageObject_GetColor (FSCRT_PAGE page, FSPDF_PAGEOBJECT pageObj, FS_BOOL isStroke, FS_ARGB *color) |
Get color of a page object. More... | |
FS_RESULT | FSPDF_PageObject_GetClipRect (FSCRT_PAGE page, FSPDF_PAGEOBJECT pageObj, FSCRT_RECTF *clipRect) |
Get clip rectangle of a page object . More... | |
FS_RESULT | FSPDF_PageObject_HasTransparency (FSCRT_PAGE page, FSPDF_PAGEOBJECT pageObj, FS_BOOL *hasTransparency) |
Check whether a page object has transparency. More... | |
FS_RESULT | FSPDF_PageObject_GetLayers (FSCRT_PAGE page, FSPDF_PAGEOBJECT pageObj, FSCRT_ARRAY *layerArray) |
Get all the layers which associate with specific page object. More... | |
FS_RESULT | FSPDF_TextObject_GetTextState (FSCRT_PAGE page, FSPDF_PAGEOBJECT textObj, FSPDF_TEXTSTATE *textState) |
Get text states of a text object. More... | |
FS_RESULT | FSPDF_TextObject_GetUnicodeString (FSCRT_PAGE page, FSPDF_PAGEOBJECT textObj, FSCRT_BSTR *unicodeStr) |
Get unicode string of a text object. More... | |
FS_RESULT | FSPDF_PathObject_GetPathData (FSCRT_PAGE page, FSPDF_PAGEOBJECT pathObj, FSCRT_PATHDATA *pathData) |
Get of path data of a path object . More... | |
FS_RESULT | FSPDF_PathObject_GetFillMode (FSCRT_PAGE page, FSPDF_PAGEOBJECT pathObj, FS_INT32 *fillMode) |
Get fill mode of a path object. More... | |
FS_RESULT | FSPDF_PathObject_GetStrokeState (FSCRT_PAGE page, FSPDF_PAGEOBJECT pathObj, FS_BOOL *isStroke) |
Get stroke state of a path object. More... | |
FS_RESULT | FSPDF_ImageObject_CloneBitmap (FSCRT_PAGE page, FSPDF_PAGEOBJECT imageObj, FSCRT_BITMAP *bitmap) |
Clone a bitmap from an image object. More... | |
FS_RESULT | FSPDF_ImageObject_GetColorSpace (FSCRT_PAGE page, FSPDF_PAGEOBJECT imageObj, FS_INT32 *colorspace) |
Get the color space for an image object. More... | |
FS_RESULT | FSPDF_ImageObject_GetStream (FSCRT_PAGE page, FSPDF_PAGEOBJECT imageObj, FSPDF_OBJECT *stream) |
Get the image stream of an image object. More... | |
FS_RESULT | FSPDF_FormXObject_GetObjects (FSCRT_PAGE page, FSPDF_PAGEOBJECT formXObj, FSPDF_PAGEOBJECTS *pageObjs) |
Get page objects from a Form XObject object. More... | |
FS_RESULT | FSPDF_FormXObject_GetStream (FSCRT_PAGE page, FSPDF_PAGEOBJECT formXObj, FSPDF_OBJECT *stream) |
Get the stream of a form XObject. More... | |
FS_RESULT | FSPDF_ShadingObject_GetShading (FSCRT_PAGE page, FSPDF_PAGEOBJECT shadingObj, FSPDF_OBJECT *shadingPDFObj) |
Get the PDF shading dictionary or stream object of a shading page object. More... | |
FS_RESULT | FSPDF_PageObject_CountClipPath (FSCRT_PAGE page, FSPDF_PAGEOBJECT pageObj, FS_INT32 *count) |
Get count of path clip in a page object. More... | |
FS_RESULT | FSPDF_PageObject_GetClipPath (FSCRT_PAGE page, FSPDF_PAGEOBJECT pageObj, FS_INT32 index, FSCRT_PATHDATA *pathData, FS_INT32 *fillMode) |
Get a path clip from a page object. More... | |
FS_RESULT | FSPDF_PageObject_CountClipText (FSCRT_PAGE page, FSPDF_PAGEOBJECT pageObj, FS_INT32 *count) |
Get count of text clip in a page object. More... | |
FS_RESULT | FSPDF_PageObject_GetClipText (FSCRT_PAGE page, FSPDF_PAGEOBJECT pageObj, FS_INT32 index, FSPDF_PAGEOBJECT *textObj) |
Get a text clip from a page object. More... | |
FS_RESULT | FSPDF_PageObjects_InsertObject (FSCRT_PAGE page, FSPDF_PAGEOBJECTS pageObjs, FS_INT32 typeFilter, FS_INT32 index, FSPDF_PAGEOBJECT pageObj) |
Insert a page object and it will be automatically freed. More... | |
FS_RESULT | FSPDF_PageObjects_RemoveObject (FSCRT_PAGE page, FSPDF_PAGEOBJECTS pageObjs, FSPDF_PAGEOBJECT pageObj) |
Remove a page object. More... | |
FS_RESULT | FSPDF_PageObjects_GenerateContents (FSCRT_PAGE page, FSPDF_PAGEOBJECTS pageObjs) |
Generate PDF Page contents. More... | |
FS_RESULT | FSPDF_PageObject_Clone (FSCRT_PAGE page, FSPDF_PAGEOBJECT pageObj, FSPDF_PAGEOBJECT *clonedPageObj) |
Clone a new page object. More... | |
FS_RESULT | FSPDF_PageObject_SetMatrix (FSCRT_PAGE page, FSPDF_PAGEOBJECT pageObj, const FSCRT_MATRIX *matrix) |
Set matrix of a page object. More... | |
FS_RESULT | FSPDF_PageObject_Transform (FSCRT_PAGE page, FSPDF_PAGEOBJECT pageObj, const FSCRT_MATRIX *matrix, FS_BOOL needTransformClipPath) |
Transform a page object. More... | |
FS_RESULT | FSPDF_PageObject_SetGraphState (FSCRT_PAGE page, FSPDF_PAGEOBJECT pageObj, const FSPDF_GRAPHSTATE *graphState) |
Set graph states of a page object. More... | |
FS_RESULT | FSPDF_PageObject_SetColor (FSCRT_PAGE page, FSPDF_PAGEOBJECT pageObj, FS_BOOL isStroke, FS_ARGB color) |
Set color of a page object . More... | |
FS_RESULT | FSPDF_PageObject_SetClipRect (FSCRT_PAGE page, FSPDF_PAGEOBJECT pageObj, const FSCRT_RECTF *clipRect) |
Set clip rectangle of a page object. More... | |
FS_RESULT | FSPDF_TextObject_Create (FSCRT_PAGE page, FSPDF_PAGEOBJECT *textObj) |
Create a new text Object. More... | |
FS_RESULT | FSPDF_TextObject_SetTextState (FSCRT_PAGE page, FSPDF_PAGEOBJECT textObj, const FSPDF_TEXTSTATE *textState, FS_BOOL italic, FS_INT32 weight) |
Set text states of a text object. More... | |
FS_RESULT | FSPDF_TextObject_SetUnicodeString (FSCRT_PAGE page, FSPDF_PAGEOBJECT textObj, const FSCRT_BSTR *unicodeStr) |
Set unicode string for a text object. More... | |
FS_RESULT | FSPDF_PathObject_Create (FSCRT_PAGE page, FSPDF_PAGEOBJECT *pathObj) |
Create a new path object. More... | |
FS_RESULT | FSPDF_PathObject_SetPathData (FSCRT_PAGE page, FSPDF_PAGEOBJECT pathObj, FSCRT_PATHDATA pathData) |
Set path data of a path object. More... | |
FS_RESULT | FSPDF_PathObject_SetFillMode (FSCRT_PAGE page, FSPDF_PAGEOBJECT pathObj, FS_INT32 fillMode) |
Set fill mode of a path object. More... | |
FS_RESULT | FSPDF_PathObject_SetStrokeState (FSCRT_PAGE page, FSPDF_PAGEOBJECT pathObj, FS_BOOL isStroke) |
Set stroke state of a path object. More... | |
FS_RESULT | FSPDF_PathObject_ConvertFromTextObject (FSCRT_PAGE page, FSPDF_PAGEOBJECT *convertedObj) |
Convert text object to path object for avoiding print deviation. More... | |
FS_RESULT | FSPDF_ImageObject_Create (FSCRT_PAGE page, FSPDF_PAGEOBJECT *imageObj) |
Create an image object. More... | |
FS_RESULT | FSPDF_ImageObject_SetBitmap (FSCRT_PAGE page, FSPDF_PAGEOBJECT imageObj, FSCRT_BITMAP bitmap, FSCRT_BITMAP mask) |
Set a bitmap to an image object. More... | |
FS_RESULT | FSPDF_ImageObject_SetImage (FSCRT_PAGE page, FSPDF_PAGEOBJECT imageObj, FSCRT_IMAGE image) |
Set an image to an image object. More... | |
FS_RESULT | FSPDF_ImageObject_SetImageFromFileName (FSCRT_PAGE page, FSPDF_PAGEOBJECT imageObj, const FSCRT_BSTR *imageFileName, FS_INT32 frameIndexOfImage) |
Set an image to an image object from a specific file path. More... | |
FS_RESULT | FSPDF_FormXObject_Create (FSCRT_PAGE page, FSPDF_PAGEOBJECT *formXObj) |
Create a Form XObject object. More... | |
FS_RESULT | FSPDF_FormXObject_ExtractAPFromPage (FSCRT_PAGE page, FSPDF_PAGEOBJECT formXObj, FSCRT_PAGE srcPage, FS_BOOL isAnnotsIncluded) |
Extract appearance of contents and annotations from a source page to a Form XObject object. More... | |
FS_RESULT | FSPDF_PageObject_AddClipPath (FSCRT_PAGE page, FSPDF_PAGEOBJECT pageObj, FSCRT_PATHDATA pathData, FS_INT32 fillMode) |
Add path for clipping to a page object. More... | |
FS_RESULT | FSPDF_PageObject_DeleteClipPath (FSCRT_PAGE page, FSPDF_PAGEOBJECT pageObj, FS_INT32 index) |
Delete a path for clipping from a page object. More... | |
FS_RESULT | FSPDF_PageObject_AddClipText (FSCRT_PAGE page, FSPDF_PAGEOBJECT pageObj, FSPDF_PAGEOBJECT textObj) |
Add text for clipping to a page object. More... | |
FS_RESULT | FSPDF_PageObject_DeleteClipText (FSCRT_PAGE page, FSPDF_PAGEOBJECT pageObj, FS_INT32 index) |
Delete a text for clipping from a page object. More... | |
FS_RESULT | FSPDF_PageObject_ClearClips (FSCRT_PAGE page, FSPDF_PAGEOBJECT pageObj) |
Clear all clips from a page object. More... | |
FS_RESULT | FSPDF_PageObject_Release (FSCRT_PAGE page, FSPDF_PAGEOBJECT pageObj) |
Release a page object which is created or which is cloned but not inserted into any PDF page. More... | |
Macro definitions of Layer Usage Types. | |
#define | FSPDF_LAYERUSAGETYPE_VIEW 0 |
Use for a viewer. | |
#define | FSPDF_LAYERUSAGETYPE_DESIGN 1 |
Use to represent a document designer's structural organization of artwork. | |
#define | FSPDF_LAYERUSAGETYPE_PRINT 2 |
Use for printing. | |
#define | FSPDF_LAYERUSAGETYPE_EXPORT 3 |
Use for exporting. | |
#define | FSPDF_LAYERUSAGETYPE_ZOOM 4 |
Use for zooming. | |
Macro definitions of Layer base state. | |
#define | FSPDF_LAYER_BASESTATE_ON 0 |
The states of all groups are turned ON. | |
#define | FSPDF_LAYER_BASESTATE_OFF 1 |
The states of all groups are turned OFF. | |
#define | FSPDF_LAYER_BASESTATE_UNCHANGED 2 |
The states of all groups are left unchanged. | |
Macro Definitions for Marked Content Parameter Types. | |
#define | FSPDF_MARKEDCONTENT_PARAMTYPE_NONE 0 |
None parameters. | |
#define | FSPDF_MARKEDCONTENT_PARAMTYPE_PROPERTIESDICT 1 |
A dictionary is defined by named resource in the "Properties" sub-dictionary of the current resource dictionary. | |
#define | FSPDF_MARKEDCONTENT_PARAMTYPE_DIRECTDICT 2 |
A dictionary may be written inline in the content stream as a direct object. | |
#define | FSPDF_MARKEDCONTENT_PARAMTYPE_MCID 3 |
(Reserved)A dictionary contains an MCID entry, which is an integer marked-content identifier that uniquely identifies marked-content sequence within its content stream. More... | |
Macro Definitions for Page Object Type | |
#define | FSPDF_PAGEOBJECT_ALL 0 |
Page object for all types. | |
#define | FSPDF_PAGEOBJECT_TEXT 1 |
Text object. | |
#define | FSPDF_PAGEOBJECT_PATH 2 |
Path object. | |
#define | FSPDF_PAGEOBJECT_IMAGE 3 |
Image object. | |
#define | FSPDF_PAGEOBJECT_SHADING 4 |
Shading object. | |
#define | FSPDF_PAGEOBJECT_FORMXOBJECT 5 |
Form XObject object. | |
Macro Definitions for Text Rendering Modes | |
#define | FSPDF_TEXTMODE_FILL 0 |
Fill text. | |
#define | FSPDF_TEXTMODE_STROKE 1 |
Stroke text. | |
#define | FSPDF_TEXTMODE_FILLSTROKE 2 |
Fill, and stroke text. | |
#define | FSPDF_TEXTMODE_INVISIBLE 3 |
Neither fill nor stroke text (invisible). | |
#define | FSPDF_TEXTMODE_FILLCLIP 4 |
Fill text and add to path for clipping. | |
#define | FSPDF_TEXTMODE_STROKECLIP 5 |
Stroke text and add to path for clipping. | |
#define | FSPDF_TEXTMODE_FILLSTROKECLIP 6 |
Fill, then stroke text and add to path for clipping. | |
#define | FSPDF_TEXTMODE_CLIP 7 |
Add text to path for clipping. | |
Macro Definitions for Image object Color space | |
#define | FSPDF_IMAGECS_INVALID 0 |
Color space: Invalid. | |
#define | FSPDF_IMAGECS_DEVICEGRAY 1 |
Color space: DeviceGray. | |
#define | FSPDF_IMAGECS_DEVICERGB 2 |
Color space: DeviceRGB. | |
#define | FSPDF_IMAGECS_DEVICECMYK 3 |
Color space: DeviceCMYK. | |
#define | FSPDF_IMAGECS_CALGRAY 4 |
Color space: CalGray. | |
#define | FSPDF_IMAGECS_CALRGB 5 |
Color space: CalRGB. | |
#define | FSPDF_IMAGECS_LAB 6 |
Color space: Lab. | |
#define | FSPDF_IMAGECS_SEPARATION 8 |
Color space: Separation. | |
#define | FSPDF_IMAGECS_DEVICEN 9 |
Color space: DeviceN. | |
#define | FSPDF_IMAGECS_PATTERN 11 |
Color space: Pattern. | |
#define | FSPDF_IMAGECS_ICCBASED_DEVICEGRAY 12 |
Color space: ICCBased. | |
#define | FSPDF_IMAGECS_ICCBASED_DEVICERGB 13 |
Color space: ICCBased. | |
#define | FSPDF_IMAGECS_ICCBASED_DEVICECMYK 14 |
Color space: ICCBased. | |
Definitions for access to PDF Page Objects, PDF Marked Content, and PDF Layers.
Definitions and functions in this module are included in fpdf_pageobjects_r.h, fpdf_pageobjects_w.h, fpdf_markedcontent_r.h, fpdf_markedcontent_w.h, fpdf_layer_r.h, and fpdf_layer_w.h.
Module: PDFPageObjects
License Identifier: PDFPageObjects/All
Available License Right: Reading/Writing
For License Right Reading, see fpdf_pageobjects_r.h, fpdf_markedcontent_r.h, and fpdf_layer_r.h.
For License Right Writing, see fpdf_pageobjects_w.h, fpdf_markedcontent_w.h, and fpdf_layer_w.h.
This module contains following features:
This module contains following features:
#define FSPDF_MARKEDCONTENT_PARAMTYPE_MCID 3 |
(Reserved)A dictionary contains an MCID entry, which is an integer marked-content identifier that uniquely identifies marked-content sequence within its content stream.
FS_RESULT FSPDF_Doc_AddLayer | ( | FSCRT_DOCUMENT | doc, |
FSCRT_BSTR * | layerName, | ||
FSPDF_LAYER * | layer | ||
) |
Add a layer to a PDF document.
[in] | doc | Handle to a FSCRT_DOCUMENT object which is a PDF document object. It shall be valid. |
[in] | layerName | Pointer to a FSCRT_BSTR structure which specify the name of form field. It should be a UTF-8 string. |
[out] | layer | Handle to a FSPDF_LAYER object which is a PDF layer. |
FS_RESULT FSPDF_Doc_EnumLayers | ( | FSCRT_DOCUMENT | document, |
FSPDF_LAYERNODE * | layers | ||
) |
Enum all PDF Layers.
[in] | document | Handle to a FSCRT_DOCUMENT object which is a PDF document object. It shall be valid. |
[out] | layers | Pointer to a FSPDF_LAYERNODE handle that receives PDF Layers. If there are any errors, it will be set NULL. |
Set the base visible state of PDF layers in the default configuration.
[in] | doc | Handle to a FSCRT_DOCUMENT object which is a PDF document object. It shall be valid. |
[in] | state | The state of a PDF layer. Please refer to macro definitions FSPDF_LAYER_BASESTATE_XXX and this should be one of these macros. |
FS_RESULT FSPDF_FormXObject_Create | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT * | formXObj | ||
) |
Create a Form XObject object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[out] | formXObj | Pointer to a FSPDF_PAGEOBJECT handle that receives the newly created Form XObject object. If there is any error, it will be NULL. |
FS_RESULT FSPDF_FormXObject_ExtractAPFromPage | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | formXObj, | ||
FSCRT_PAGE | srcPage, | ||
FS_BOOL | isAnnotsIncluded | ||
) |
Extract appearance of contents and annotations from a source page to a Form XObject object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. Parameter formXObj comes from this page. |
[in] | formXObj | Handle to a FSPDF_PAGEOBJECT object that receives the extracted appearance data of contents and annotations in parameter srcPage. This is returned by function FSPDF_FormXObject_Create. |
[in] | srcPage | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. The extracted data comes from this source page. |
[in] | isAnnotsIncluded | A boolean value that indicates whether annotations are included when extracting appearance. |
FS_RESULT FSPDF_FormXObject_GetObjects | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | formXObj, | ||
FSPDF_PAGEOBJECTS * | pageObjs | ||
) |
Get page objects from a Form XObject object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | formXObj | Handle to aFSPDF_PAGEOBJECT object which is a Form XObject object. It should be valid. |
[out] | pageObjs | Pointer to a FSPDF_PAGEOBJECTS handle that receives the page objects. If there is any error, it will be NULL. |
FS_RESULT FSPDF_FormXObject_GetStream | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | formXObj, | ||
FSPDF_OBJECT * | stream | ||
) |
Get the stream of a form XObject.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | formXObj | Handle to aFSPDF_PAGEOBJECT object which is a form XObject object. It should be valid. |
[out] | stream | Pointer to a FSPDF_OBJECT handle that receives the stream of a form XObject. If there is any error, it will be NULL. |
FS_RESULT FSPDF_ImageObject_CloneBitmap | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | imageObj, | ||
FSCRT_BITMAP * | bitmap | ||
) |
Clone a bitmap from an image object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | imageObj | Handle to a FSPDF_PAGEOBJECT object which is an image object. It should be valid. |
[out] | bitmap | Pointer to a FSCRT_BITMAP handle that receives a bitmap. If there is any error, it will be NULL. |
FS_RESULT FSPDF_ImageObject_Create | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT * | imageObj | ||
) |
Create an image object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[out] | imageObj | Pointer to a FSPDF_PAGEOBJECT handle that receives the newly created image object. If there is any error, it will be NULL. |
FS_RESULT FSPDF_ImageObject_GetColorSpace | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | imageObj, | ||
FS_INT32 * | colorspace | ||
) |
Get the color space for an image object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | imageObj | Handle to a FSPDF_PAGEOBJECT object which is an image object. It should be valid. |
[out] | colorspace | Pointer to a FS_INT32 object that receives colorspace for an image object. Please refer to macro definitions FSPDF_IMAGECS_XXX and this would be one of these macros. |
FS_RESULT FSPDF_ImageObject_GetStream | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | imageObj, | ||
FSPDF_OBJECT * | stream | ||
) |
Get the image stream of an image object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | imageObj | Handle to a FSPDF_PAGEOBJECT object which is an image object. It should be valid. |
[out] | stream | Pointer to a FSPDF_OBJECT object that receives the image stream for an image object. |
FS_RESULT FSPDF_ImageObject_SetBitmap | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | imageObj, | ||
FSCRT_BITMAP | bitmap, | ||
FSCRT_BITMAP | mask | ||
) |
Set a bitmap to an image object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | imageObj | Handle to a FSPDF_PAGEOBJECT object which is an image object. It should be valid. |
[in] | bitmap | Handle to a FSCRT_BITMAP object which is a bitmap object, and it can be returned by function FSCRT_Bitmap_Create or FSCRT_Bitmap_Clone. |
[in] | mask | Handle to a FSCRT_BITMAP object which is a bitmap object for mask, and its format should be FSCRT_BITMAPFORMAT_8BPP_MASK. This is valid only when parameter bitmap does not have an alpha channel. It can be NULL or returned by function FSCRT_Bitmap_Create or FSCRT_Bitmap_Clone. |
FS_RESULT FSPDF_ImageObject_SetImage | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | imageObj, | ||
FSCRT_IMAGE | image | ||
) |
Set an image to an image object.
Parameter imageObj can be set only one frame, so that caller must call function FSCRT_Image_LoadFrame to load a frame of parameter image which is to be set.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | imageObj | Handle to a FSPDF_PAGEOBJECT object which is an image object. It should be valid. |
[in] | image | Handle to a FSCRT_IMAGE object which is a bitmap object, and it is returned or by function FSCRT_Image_LoadFromFile. |
FS_RESULT FSPDF_ImageObject_SetImageFromFileName | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | imageObj, | ||
const FSCRT_BSTR * | imageFileName, | ||
FS_INT32 | frameIndexOfImage | ||
) |
Set an image to an image object from a specific file path.
The function can optimize the consume of memory for image in type FSCRT_IMAGETYPE_TIF, however, it may reduce the performance a little bit. For other image types, this function is just the same as function FSPDF_ImageObject_SetImage.
Users must not move or remove the image file specified by parameter imageFileName until current document is closed.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | imageObj | Handle to a FSPDF_PAGEOBJECT object which is an image object. It should be valid. |
[in] | imageFileName | Pointer to a UTF-8 encoded string that specifies a path of image file. It should be a valid pointer to FSCRT_BSTR. |
[in] | frameIndexOfImage | The zero-based index of the frame in the image specified by parameter imageFileName. Range: 0 to (FrameCount-1). FrameCount is the count of frames in the image. |
FS_RESULT FSPDF_Layer_AddPageObject | ( | FSPDF_LAYER | layer, |
FSCRT_PAGE | page, | ||
FSPDF_PAGEOBJECT | pageObj | ||
) |
Add a page object to a PDF layer.
[in] | layer | Handle to a FSPDF_LAYER object which is a PDF layer. It shall be valid. |
[in] | page | Handle to a FSCRT_PAGE object which is a page object. |
[in] | pageObj | Handle to a FSPDF_PAGEOBJECT object which is a page object. |
FS_RESULT FSPDF_Layer_EnumeratePageObject | ( | FSPDF_LAYER | layer, |
FSCRT_PAGE | page, | ||
FSCRT_POSITION * | position, | ||
FSPDF_PAGEOBJECT * | pageObj | ||
) |
Enumerate page objects and retrieve a page object which is related with a specific layer.
The type of page object(which is to be got) is specified by parameter typeFilter.
[in] | layer | Handle to a FSPDF_LAYER object which is a PDF layer. It shall be valid. |
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in,out] | position | Pointer to a FSCRT_POSITION object which represents the position of a page object. When this function is called, it represents the position of a page object which is to be retrieved. If call this function for first time, please pass a FSPDF_POSITION object with value NULL , in order to retrieved the first page object. When this function returns, it will receive the position of next page object. If there is no more page objects to be enumerated, a FSPDF_POSITION object with value -1 will be returned. |
[out] | pageObj | Pointer to a FSPDF_PAGEOBJECT handle that receives a specific page object. If there is any error or the enumeration is finished, it will be NULL. |
FS_RESULT FSPDF_Layer_GetApplicationUsage | ( | FSPDF_LAYER | layer, |
FS_INT32 | usageType, | ||
FS_LPVOID | param | ||
) |
Get the application usage and its parameter of a PDF layer.
[in] | layer | Handle to a FSPDF_LAYER object. |
[in] | usageType | A FS_INT32 object indicates the type of usage. It should be one of following macro definitions(not support ::FSPDF_LAYERUSAGETYPE_DESIGN): |
[out] | param | A pointer to the param of eventType. Its type is decided by usageType:
|
FS_RESULT FSPDF_Layer_GetName | ( | FSPDF_LAYER | layer, |
FSCRT_BSTR * | name | ||
) |
Get the name of a PDF layer.
[in] | layer | Handle to a FSPDF_LAYER object which is a PDF layer. It shall be valid. |
[out] | name | Pointer to a FSCRT_BSTR structure that receives a layer name. It shall be a UTF-8 string. If there are any errors, FSCRT_BSTR::str will be set NULL, and FSCRT_BSTR::len will be set 0. |
FS_RESULT FSPDF_Layer_HasIntent | ( | FSPDF_LAYER | layer, |
const FSCRT_BSTR * | intent, | ||
FS_BOOL * | hasIntent | ||
) |
Check whether a PDF layer has a specific intent.
[in] | layer | Handle to a FSPDF_LAYER object which is a PDF layer. It shall be valid. |
[in] | intent | Pointer to a FSCRT_BSTR structure that specifies the intent name. It shall be a UTF-8 string. Currently, PDF defines two intent names:"View","Design". |
[out] | hasIntent | Pointer to a FS_BOOL object that receives a boolean value which indicates whether a layer has a specific intent TRUE means it has the intent, while FALSE means not. If there are any errors, it will be FALSE. |
Check whether a PDF layer is in a given page or not.
[in] | page | Handle to a FSPDF_PAGE object which is a PDF page. It shall be valid |
[in] | layer | Handle to a FSPDF_LAYER object which is a PDF layer. It shall be valid. |
[out] | isInPage | Pointer to a FS_BOOL object that receives a boolean value which indicates whether a layer is in a given page or not: TRUE means in the page, while FALSE means not. If there are any errors, it will be FALSE. |
Remove a layer from the document.
It will reconstruct the structure of layer tree to remove a layer. Currently, Foxit SDK will remove the sub layers of the layers which is removed.
[in] | layer | Handle to a FSPDF_LAYER object which is a PDF layer. |
[in] | options | Indicates how to deal with sub layers. This parameter is reserved, and should be 0. |
Remove the application usage of a PDF layer. If some events is triggered, the visibility of PDF layer will be switched.
[in] | layer | Handle to a FSPDF_LAYER object. |
[in] | usageType | A FS_INT32 object indicates the type of usage. It should be one of macro definations below: |
FS_RESULT FSPDF_Layer_RemovePageObject | ( | FSPDF_LAYER | layer, |
FSPDF_PAGEOBJECT | pageObj | ||
) |
Remove a page object from a PDF layer.
[in] | layer | Handle to a FSPDF_LAYER object which is a PDF layer. It shall be valid. |
[in] | pageObj | Handle to a FSPDF_PAGEOBJECT object which is a page object. |
FS_RESULT FSPDF_Layer_SetApplicationUsage | ( | FSPDF_LAYER | layer, |
FS_INT32 | usageType, | ||
FS_LPVOID | param | ||
) |
Set the application usage of a PDF layer. If some events is triggered, the visibility of PDF layer will be switched.
[in] | layer | Handle to a FSPDF_LAYER object. |
[in] | usageType | A FS_INT32 object indicates the type of usage. It should be one of macro definations below(not support ::FSPDF_LAYERUSAGETYPE_DESIGN): |
[out] | param | A pointer to the param of eventType. Its type is decided by usageType:
|
Set the default visible state of a PDF layer in the default configuration.
[in] | layer | Handle to a FSPDF_LAYER object which is a PDF layer. |
[in] | state | A boolean value that indicate the default status(TRUE for visible, FALSE for invisible) of a PDF layer in the document. |
FS_RESULT FSPDF_Layer_SetName | ( | FSPDF_LAYER | layer, |
const FSCRT_BSTR * | name | ||
) |
Set the name of a PDF layer.
[in] | layer | Handle to a FSPDF_LAYER object which is a PDF layer. It should be valid. |
[in] | name | Pointer to a FSCRT_BSTR structure that specifies a layer name. It should be a valid UTF-8 string. |
FS_RESULT FSPDF_LayerContext_CopyStates | ( | FSPDF_LAYERCONTEXT | destContext, |
FSPDF_LAYERCONTEXT | srcContext | ||
) |
Copy a PDF layer context state from another PDF layer context.
[in] | destContext | Handle to a FSPDF_LAYERCONTEXT object which is the destination PDF layer context. |
[in] | srcContext | Handle to a FSPDF_LAYERCONTEXT object which is the source PDF layer context. |
FS_RESULT FSPDF_LayerContext_Create | ( | FSCRT_DOCUMENT | document, |
FS_INT32 | usType, | ||
FSPDF_LAYERCONTEXT * | context | ||
) |
Create a PDF layer context with a given type.
[in] | document | Handle to a FSCRT_DOCUMENT object which is a PDF document object. It should be valid. |
[in] | usType | Pointer to a FS_INT32 object indicating usage type. It should be one of the following macro definitions (not support FSPDF_LAYERUSAGETYPE_ZOOM): |
[out] | context | Pointer to a FSPDF_LAYERCONTEXT handle that receives a PDF layer context. If there are any errors, it will be NULL. |
FS_RESULT FSPDF_LayerContext_GetDocument | ( | FSPDF_LAYERCONTEXT | context, |
FSCRT_DOCUMENT * | document | ||
) |
Retrieve a PDF document which owns a PDF layer context.
[in] | context | Handle to a FSPDF_LAYERCONTEXT object which is a PDF layer context. |
[out] | document | Pointer to a FSCRT_DOCUMENT handle that receives a PDF document. If there are any errors, it will be NULL. |
Get usage type of a PDF layer context.
[in] | context | Handle to a FSPDF_LAYERCONTEXT object which is a PDF layer context. |
[out] | usType | Pointer to a FS_INT32 object that receives a usage type. It would be one of the following macro definitions (not support FSPDF_LAYERUSAGETYPE_ZOOM): If there are any errors, it will be -1. |
FS_RESULT FSPDF_LayerContext_IsVisible | ( | FSPDF_LAYERCONTEXT | context, |
FSPDF_LAYER | layer, | ||
FS_BOOL * | visible | ||
) |
Check whether a PDF layer is visible or not.
[in] | context | Handle to a FSPDF_LAYERCONTEXT object which is PDF layer context. |
[in] | layer | Handle to a FSPDF_LAYER object which is a PDF layer. It shall be valid. |
[out] | visible | Pointer to a FS_BOOL object that receives a boolean value which indicates whether a layer is visible or not: TRUE means visible, or FALSE means not. If there are any errors, it will be FALSE. |
FS_RESULT FSPDF_LayerContext_MergeStates | ( | FSPDF_LAYERCONTEXT | destContext, |
FSPDF_LAYERCONTEXT | srcContext | ||
) |
Merge state from source PDF layer context to destination.
[in] | destContext | Handle to a FSPDF_LAYERCONTEXT object which is the destination PDF layer context. |
[in] | srcContext | Handle to a FSPDF_LAYERCONTEXT object which is the source PDF layer context. It should be a different usage type with parameter destContext. |
FS_RESULT FSPDF_LayerContext_Release | ( | FSPDF_LAYERCONTEXT | context | ) |
Release a PDF layer context.
[in] | context | Handle to a FSPDF_LAYERCONTEXT object which is a PDF layer context. |
FS_RESULT FSPDF_LayerContext_Reset | ( | FSPDF_LAYERCONTEXT | context | ) |
Reset a PDF layer context.
[in] | context | Handle to a FSPDF_LAYERCONTEXT object which is a PDF layer context. |
FS_RESULT FSPDF_LayerContext_SetVisible | ( | FSPDF_LAYERCONTEXT | context, |
FSPDF_LAYER | layer, | ||
FS_BOOL | visible | ||
) |
Change the visibility state of a PDF layer.
[in] | context | Handle to a FSPDF_LAYERCONTEXT object which is a PDF layer context. |
[in] | layer | Handle to a FSPDF_LAYER object which is a PDF layer. It shall be valid. |
[in] | visible | A FS_BOOL value which represents the visibility state of PDF layer: TRUE means visible, while FALSE means not. |
FS_RESULT FSPDF_LayerNode_Clear | ( | FSPDF_LAYERNODE * | layers | ) |
Helper function to clear a PDF layer node.
[in] | layers | Pointer to a FSPDF_LAYERNODE structure which will be cleared. |
FS_RESULT FSPDF_LayerNode_Init | ( | FSPDF_LAYERNODE * | layers | ) |
Helper function to initialize a PDF layer node.
[in] | layers | Pointer to a FSPDF_LAYERNODE structure which will be initialized. |
FS_RESULT FSPDF_MarkedContent_AddItem | ( | FSCRT_PAGE | page, |
FSPDF_MARKEDCONTENT | mc, | ||
const FSCRT_BSTR * | tagName, | ||
FS_INT32 | paramType, | ||
FS_LPCVOID | param | ||
) |
Add a new marked content item to the current marked content object.
A marked content object may be nested one within another, and this function is used to add a new marked content item to the current marked content object associated with the current page object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | mc | Handle to a FSPDF_MARKEDCONTENT object which is a marked content object. |
[in] | tagName | Pointer to a FSCRT_BSTR structure to specify value of the tag name. It should be a UTF-8 string. |
[in] | paramType | Pointer to FS_INT32 object that specifies a parameter type. Please refer to macro definitions FSPDF_MARKEDCONTENT_PARAMTYPE_XXX and this should be one of these macros except FSPDF_MARKEDCONTENT_PARAMTYPE_MCID. Also check comments of the parameter param and note part for more details. |
[in] | param | Pointer to FS_LPVOID object that specifies a parameter value.
|
FS_RESULT FSPDF_MarkedContent_CountItems | ( | FSCRT_PAGE | page, |
FSPDF_MARKEDCONTENT | mc, | ||
FS_INT32 * | count | ||
) |
Get the count of marked content items in the marked content sequence.
A marked content object may be nested one within another, and this function is used to get the count of marked content items in the current marked content sequence.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | mc | Handle to a FSPDF_MARKEDCONTENT object which is a marked content object. |
[out] | count | Pointer to a FS_INT32 object that receives count of marked content items. If there are any errors, it shall be set 0. |
FS_RESULT FSPDF_MarkedContent_DeleteItem | ( | FSCRT_PAGE | page, |
FSPDF_MARKEDCONTENT | mc, | ||
const FSCRT_BSTR * | tagName | ||
) |
Delete a specific marked content item from the current marked content sequence.
A marked content object may be nested one within another, and this function is used to delete a specific marked content item from current marked content sequence.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | mc | Handle to a FSPDF_MARKEDCONTENT object which is a marked content object. |
[in] | tagName | Pointer to a FSCRT_BSTR structure to specify value of the tag name. It should be a UTF-8 string. |
FS_RESULT FSPDF_MarkedContent_GetItemParam | ( | FSCRT_PAGE | page, |
FSPDF_MARKEDCONTENT | mc, | ||
const FSCRT_BSTR * | tagName, | ||
FS_INT32 * | paramType, | ||
FS_LPVOID * | param | ||
) |
Get a parameter type of a parameter value of a specific marked content item.
A marked content object may be nested one within another, and this function is used to get the parameter type and its value of a specific marked content item in the current marked content sequence.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | mc | Handle to a FSPDF_MARKEDCONTENT object which is a marked content object. |
[in] | tagName | Pointer to a FSCRT_BSTR structure to specify value of the tag name. It should be a UTF-8 string. |
[out] | paramType | Pointer to FS_INT32 object that receives a parameter type. Please refer to macro definitions FSPDF_MARKEDCONTENT_PARAMTYPE_XXX and this would be one of these macros. If there are any errors, it will be set -1. |
[out] | param | Pointer to FS_LPVOID object that receives the parameter value.
|
FS_RESULT FSPDF_MarkedContent_GetTagName | ( | FSCRT_PAGE | page, |
FSPDF_MARKEDCONTENT | mc, | ||
FS_INT32 | index, | ||
FSCRT_BSTR * | tagName | ||
) |
Get the tag name of a specific marked content item.
A marked content object may be nested one within another, and this function is used to get tag name of a specific marked content item in the current marked content sequence.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | mc | Handle to a FSPDF_MARKEDCONTENT object which is a marked content object. |
[in] | index | The index of the marked content item. Range: 0 to (itemcount-1). itemcount is returned by the function FSPDF_MarkedContent_CountItems. |
[out] | tagName | Pointer to a FSCRT_BSTR structure (a UTF-8 string) that receives value of tag name. If there are any errors, FSCRT_BSTR::str will be set empty if it is not NULL, and FSCRT_BSTR::len will be set 0. |
FS_RESULT FSPDF_MarkedContent_HasTag | ( | FSCRT_PAGE | page, |
FSPDF_MARKEDCONTENT | mc, | ||
const FSCRT_BSTR * | tagName, | ||
FS_BOOL * | bHas | ||
) |
Check whether a marked content object has a specified marked content item.
A marked content object may be nested one within another, and this function is used to check whether a marked content object has a specified marked content item in the current marked content sequence.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | mc | Handle to a FSPDF_MARKEDCONTENT object which is a marked content object. |
[in] | tagName | Pointer to a FSCRT_BSTR structure to specify value of the tag name. It should be a UTF-8 string. |
[out] | bHas | Pointer to a FS_BOOL object that receives a boolean value which specifies whether there is a marked content item with the specific tag name. If there are any errors, it will be FALSE. |
FS_RESULT FSPDF_Page_GetPageObjects | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECTS * | pageObjs | ||
) |
Get page objects in a PDF page.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[out] | pageObjs | Pointer to a FSPDF_PAGEOBJECTS handle that receives page objects. If there is any error, it will be NULL. |
FS_RESULT FSPDF_PageObject_AddClipPath | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | pageObj, | ||
FSCRT_PATHDATA | pathData, | ||
FS_INT32 | fillMode | ||
) |
Add path for clipping to a page object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObj | Handle to a FSPDF_PAGEOBJECT object which is a page object. It should be valid. |
[in] | pathData | Handle to a FSCRT_PATHDATA object to be set. |
[in] | fillMode | Please refer to macro definitions FSCRT_FILLMODE_XXX and this should be one of these macros. |
FS_RESULT FSPDF_PageObject_AddClipText | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | pageObj, | ||
FSPDF_PAGEOBJECT | textObj | ||
) |
Add text for clipping to a page object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObj | Handle to a FSPDF_PAGEOBJECT object which is a page object. It should be valid. |
[in] | textObj | Handle to a FSPDF_PAGEOBJECT object which is a text object. It should be valid. |
FS_RESULT FSPDF_PageObject_ClearClips | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | pageObj | ||
) |
Clear all clips from a page object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObj | Handle to a FSPDF_PAGEOBJECT object which is a page object. It should be valid. |
FS_RESULT FSPDF_PageObject_Clone | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | pageObj, | ||
FSPDF_PAGEOBJECT * | clonedPageObj | ||
) |
Clone a new page object.
Newly cloned page object is related to input PDF page. So it can only be used inside the document which contains the input page.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObj | Handle to a FSPDF_PAGEOBJECT object which is a page object. It should be valid. |
[out] | clonedPageObj | Pointer to a FSPDF_PAGEOBJECT handle that receives a cloned page object. If there is any error, it will be NULL. |
FS_RESULT FSPDF_PageObject_CountClipPath | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | pageObj, | ||
FS_INT32 * | count | ||
) |
Get count of path clip in a page object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObj | Handle to a FSPDF_PAGEOBJECT object which is a page object. It should be valid. |
[out] | count | Pointer to a FS_INT32 object that receives count of path clips. If there is any error, it will be set 0. |
FS_RESULT FSPDF_PageObject_CountClipText | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | pageObj, | ||
FS_INT32 * | count | ||
) |
Get count of text clip in a page object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObj | Handle to a FSPDF_PAGEOBJECT object which is a page object. It should be valid. |
[out] | count | Pointer to a FS_INT32 object that receives count of text clips. If there is any error, it will be 0. |
FS_RESULT FSPDF_PageObject_DeleteClipPath | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | pageObj, | ||
FS_INT32 | index | ||
) |
Delete a path for clipping from a page object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObj | Handle to a FSPDF_PAGEOBJECT object which is a page object. It should be valid. |
[in] | index | Index of path to be deleted. Range: 0 to (pathcount-1). pathcount is returned by function FSPDF_PageObject_CountClipPath. |
FS_RESULT FSPDF_PageObject_DeleteClipText | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | pageObj, | ||
FS_INT32 | index | ||
) |
Delete a text for clipping from a page object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObj | Handle to a FSPDF_PAGEOBJECT object which is a page object. It should be valid. |
[in] | index | Index of path to be deleted. Range: 0 to (pathcount-1). pathcount is returned by function FSPDF_PageObject_CountClipText. |
FS_RESULT FSPDF_PageObject_GetClipPath | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | pageObj, | ||
FS_INT32 | index, | ||
FSCRT_PATHDATA * | pathData, | ||
FS_INT32 * | fillMode | ||
) |
Get a path clip from a page object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObj | Handle to a FSPDF_PAGEOBJECT object which is a page object. It should be valid. |
[in] | index | Index of path clip. Range: 0 to (clippathcount-1). clippathcount is returned by function FSPDF_PageObject_CountClipPath. |
[out] | pathData | Pointer to a FSCRT_PATHDATA handle that receives path data. If there is any error, path data will be cleared and count of points will be 0. |
[out] | fillMode | Pointer to a FS_INT32 object that receives the fill mode. Please refer to macro definitions FSCRT_FILLMODE_XXX and this would be one of these macros. If there is any error, it will be set FSCRT_FILLMODE_NONE. |
FS_RESULT FSPDF_PageObject_GetClipRect | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | pageObj, | ||
FSCRT_RECTF * | clipRect | ||
) |
Get clip rectangle of a page object .
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObj | Handle to a FSPDF_PAGEOBJECT object which is a page object. It should be valid. |
[out] | clipRect | Pointer to a FSCRT_RECTF structure that receives the clip rect. If there is any error, it will be [0 0 0 0]. |
FS_RESULT FSPDF_PageObject_GetClipText | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | pageObj, | ||
FS_INT32 | index, | ||
FSPDF_PAGEOBJECT * | textObj | ||
) |
Get a text clip from a page object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObj | Handle to a FSPDF_PAGEOBJECT object which is a page object. It should be valid. |
[in] | index | Index of clip text. Range: 0 to (textclipcount-1). textclipcount is returned by function FSPDF_PageObject_CountClipText. |
[out] | textObj | Pointer to a FSPDF_PAGEOBJECT handle that receives a specific text page object. If there is any error, it will be NULL. |
FS_RESULT FSPDF_PageObject_GetColor | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | pageObj, | ||
FS_BOOL | isStroke, | ||
FS_ARGB * | color | ||
) |
Get color of a page object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObj | Handle to a FSPDF_PAGEOBJECT object which is a page object. It should be valid. |
[in] | isStroke | A FS_BOOL indicates to get stroke color if TRUE, or to get fill color if FALSE. |
[out] | color | Pointer to a FS_ARGB object that receives color. Format: 0xAARRGGBB. If there is any error, it will be 0. |
FS_RESULT FSPDF_PageObject_GetGraphState | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | pageObj, | ||
FSPDF_GRAPHSTATE * | graphState | ||
) |
Get graph states of a page object .
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObj | Handle to a FSPDF_PAGEOBJECT object which is a page object. It should be valid. |
[out] | graphState | Pointer to a FSPDF_GRAPHSTATE structure that receives the graph state. |
FS_RESULT FSPDF_PageObject_GetLayers | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | pageObj, | ||
FSCRT_ARRAY * | layerArray | ||
) |
Get all the layers which associate with specific page object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObj | Pointer to a FSPDF_PAGEOBJECT handle that receives a specific page object. If there is any error, it will be NULL. |
[out] | layerArray | Pointer to a FSCRT_ARRAY object which recieves the layers. |
FS_RESULT FSPDF_PageObject_GetMarkedContent | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | pageObj, | ||
FSPDF_MARKEDCONTENT * | mc | ||
) |
Get a marked content object from a page object.
This function is used to get a marked content object from a specific page object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObj | Handle to a FSPDF_PAGEOBJECT object which is a page object. |
[out] | mc | Pointer to a FSPDF_MARKEDCONTENT handle that receives a marked content object. If there is any errors, this shall be NULL. |
FS_RESULT FSPDF_PageObject_GetMatrix | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | pageObj, | ||
FSCRT_MATRIX * | matrix | ||
) |
Get matrix of a page object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObj | Handle to a FSPDF_PAGEOBJECT object which is a page object. It should be valid. |
[out] | matrix | Pointer to a FSCRT_MATRIX structure that receives matrix of pageObj. If there is any error, it will be set [1 0 0 1 0 0]. |
FS_RESULT FSPDF_PageObject_GetRect | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | pageObj, | ||
FSCRT_RECTF * | rect | ||
) |
Get rectangle of a page object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObj | Handle to a FSPDF_PAGEOBJECT object which is a page object. It should be valid. |
[out] | rect | Pointer to a FSCRT_RECTF structure that receives the rect. If there is any error, it will be [0 0 0 0]. |
Get type of a page object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObj | Handle to a FSPDF_PAGEOBJECT object which is a page object. It should be valid. |
[out] | type | Pointer to a FS_INT32 object that receives the type. Please refer to macro definitions FSPDF_PAGEOBJECT_XXX and this would be one of these macros. If there is any error, it will be set -1. |
FS_RESULT FSPDF_PageObject_HasTransparency | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | pageObj, | ||
FS_BOOL * | hasTransparency | ||
) |
Check whether a page object has transparency.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObj | Handle to a FSPDF_PAGEOBJECT object which is a page object. It should be valid. |
[out] | hasTransparency | Pointer to a FS_BOOL object that receives a boolean value which indicates whether pageObj has transparency:
|
FS_RESULT FSPDF_PageObject_Release | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | pageObj | ||
) |
Release a page object which is created or which is cloned but not inserted into any PDF page.
This function is used to release page objects which are created by functions FSPDF_TextObject_Create, FSPDF_PathObject_Create, FSPDF_ImageObject_Create, FSPDF_FormXObject_Create, or FSPDF_PageObject_Clone, but not be inserted to PDF page.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObj | Handle to a FSPDF_PAGEOBJECT object which is a page object. |
FS_RESULT FSPDF_PageObject_SetClipRect | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | pageObj, | ||
const FSCRT_RECTF * | clipRect | ||
) |
Set clip rectangle of a page object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObj | Handle to a FSPDF_PAGEOBJECT object which is a page object. It should be valid. |
[in] | clipRect | Pointer to a FSCRT_RECTF structure of clip rectangle to be set. |
FS_RESULT FSPDF_PageObject_SetColor | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | pageObj, | ||
FS_BOOL | isStroke, | ||
FS_ARGB | color | ||
) |
Set color of a page object .
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObj | Handle to a FSPDF_PAGEOBJECT object which is a page object. It should be valid. |
[in] | isStroke | A FS_BOOL to set stroke color if TRUE, or to set fill color if FALSE. |
[in] | color | A FS_ARGB is to be set. Format: 0xAARRGGBB. |
FS_RESULT FSPDF_PageObject_SetGraphState | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | pageObj, | ||
const FSPDF_GRAPHSTATE * | graphState | ||
) |
Set graph states of a page object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObj | Handle to a FSPDF_PAGEOBJECT object which is a page object. It should be valid. |
[in] | graphState | Pointer to a FSPDF_GRAPHSTATE structure to be set. |
FS_RESULT FSPDF_PageObject_SetMatrix | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | pageObj, | ||
const FSCRT_MATRIX * | matrix | ||
) |
Set matrix of a page object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObj | Handle to a FSPDF_PAGEOBJECT object which is a page object. It should be valid. If it is a text object, matrix of this object can be set only if it has a font. |
[in] | matrix | Pointer to a FSCRT_MATRIX structure object to be set. |
FS_RESULT FSPDF_PageObject_Transform | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | pageObj, | ||
const FSCRT_MATRIX * | matrix, | ||
FS_BOOL | needTransformClipPath | ||
) |
Transform a page object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObj | Handle to a FSPDF_PAGEOBJECT object which is a page object. It should be valid. If it is a text object, matrix of this object can be set only if it has a font. |
[in] | matrix | Pointer to a FSCRT_MATRIX structure object. |
[in] | needTransformClipPath | A FS_BOOL to indicate whether to transform the clip path with page object, or transform the page object only. |
FS_RESULT FSPDF_PageObjects_CountObjects | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECTS | pageObjs, | ||
FS_INT32 | typeFilter, | ||
FS_INT32 * | count | ||
) |
Get the count of page objects with specific type.
Count all page objects if parameter typeFilter is FSPDF_PAGEOBJECT_ALL.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObjs | Handle to a FSPDF_PAGEOBJECTS object which is the page objects. It should be valid. |
[in] | typeFilter | A filter flag which specifies what type of page objects is to be counted out. Please refer to macro definitions FSPDF_PAGEOBJECT_XXX and this should be one of these macros. |
[out] | count | Pointer to a FS_INT32 object that receives count of specific type. If there is any error, it will be 0. |
FS_RESULT FSPDF_PageObjects_EnumerateObject | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECTS | pageObjs, | ||
FS_INT32 | typeFilter, | ||
FSCRT_POSITION * | position, | ||
FSPDF_PAGEOBJECT * | pageObj | ||
) |
Enumerate page objects and retrieve a page object at a given position from page objects.
The type of page object(which is to be got) is specified by parameter typeFilter.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObjs | Handle to a FSPDF_PAGEOBJECTS object which is the page objects. It should be valid. |
[in] | typeFilter | A filter flag for the type of page objects. Please refer to macro definitions FSPDF_PAGEOBJECT_XXX and this should be one of these macros. |
[in,out] | position | Pointer to a FSCRT_POSITION object which represents the position of a page object. When this function is called, it represents the position of a page object which is to be retrieved. If call this function for first time, please pass a FSPDF_POSITION object with value NULL , in order to retrieved the first page object. When this function returns, it will receive the position of next page object. If there is no more page objects to be enumerated, a FSPDF_POSITION object with value -1 will be returned. |
[out] | pageObj | Pointer to a FSPDF_PAGEOBJECT handle that receives a specific page object. If there is any error, it will be NULL. |
FS_RESULT FSPDF_PageObjects_GenerateContents | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECTS | pageObjs | ||
) |
Generate PDF Page contents.
Application must call this function before saving the page to a file or reload the page, otherwise all changes to the page objects will be lost. If application wants to render page after generating its content, please call function FSPDF_Page_StartParse to re-parse the PDF page before rendering.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObjs | Handle to a FSPDF_PAGEOBJECTS object which is the page objects. It should be valid. |
FS_RESULT FSPDF_PageObjects_GetObject | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECTS | pageObjs, | ||
FS_INT32 | typeFilter, | ||
FS_INT32 | index, | ||
FSPDF_PAGEOBJECT * | pageObj | ||
) |
Get a page object from page objects.
The type of page object(which is to be got) is specified by parameter typeFilter. If parameter typeFilter is FSPDF_PAGEOBJECT_ALL, parameter index is of all page objects.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObjs | Handle to a FSPDF_PAGEOBJECTS object which is the page objects. It should be valid. |
[in] | typeFilter | A filter flag for the type of page objects. Please refer to macro definitions FSPDF_PAGEOBJECT_XXX and this should be one of these macros. |
[in] | index | Index of page object. Range: 0 to (objcount-1). objcount is returned by function FSPDF_PageObjects_CountObjects. |
[out] | pageObj | Pointer to a FSPDF_PAGEOBJECT handle that receives a specific page object. If there is any error, it will be NULL. |
FS_RESULT FSPDF_PageObjects_GetObjectAtPos | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECTS | pageObjs, | ||
FS_INT32 | typeFilter, | ||
FS_FLOAT | x, | ||
FS_FLOAT | y, | ||
FS_FLOAT | tolerance, | ||
FSPDF_PAGEOBJECT * | pageObj | ||
) |
Get a page object at a specific point, in PDF page coordinate system.
Get any type page object if parameter typeFilter is FSPDF_PAGEOBJECT_ALL at the point.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObjs | Handle to a FSPDF_PAGEOBJECTS object which is the page objects. It should be valid. |
[in] | typeFilter | A filter flag for the type of page objects. Please refer to macro definitions FSPDF_PAGEOBJECT_XXX and this should be one of these macros. |
[in] | x | X position in PDF page coordinate system. |
[in] | y | Y position in PDF page coordinate system. |
[in] | tolerance | Tolerance value for a page object hit detection, in point units. It should not be a negative. |
[out] | pageObj | Pointer to a FSPDF_PAGEOBJECT handle that receives a specific page object. If there is any error, it will be NULL. |
FS_RESULT FSPDF_PageObjects_GetObjectIndex | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECTS | pageObjs, | ||
FSPDF_PAGEOBJECT | pageObj, | ||
FS_INT32 | typeFilter, | ||
FS_INT32 * | index | ||
) |
Get index of a page object.
If parameter typeFilter is FSPDF_PAGEOBJECT_ALL, parameter index is of all page objects.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObjs | Handle to a FSPDF_PAGEOBJECTS object which is the page objects. It should be valid. |
[in] | pageObj | Handle to a FSPDF_PAGEOBJECT object which is a page object. It should be valid. |
[in] | typeFilter | A filter flag for the type of page objects. Please refer to macro definitions FSPDF_PAGEOBJECT_XXX and this should be one of these macros. |
[out] | index | Pointer to a FS_INT32 object that receives the index, which is zero-based. If there is any error, it will be -1. |
FS_RESULT FSPDF_PageObjects_GetObjectListAtPos | ( | FSCRT_PAGE | page, |
FS_INT32 | typeFilter, | ||
FS_FLOAT | x, | ||
FS_FLOAT | y, | ||
FS_FLOAT | tolerance, | ||
FSCRT_ARRAY * | pageObjList | ||
) |
Get an array of all page objects at a specific point, in PDF page coordinate system.
Get any kind of page object if parameter typeFilter is FSPDF_PAGEOBJECT_ALL at the point.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | typeFilter | A filter flag for the type of page objects. Please refer to macro definitions FSPDF_PAGEOBJECT_XXX and this should be one of these macros. |
[in] | x | X position in PDF page coordinate system. |
[in] | y | Y position in PDF page coordinate system. |
[in] | tolerance | Tolerance value for a page object hit detection, in point units. It should not be a negative. |
[out] | pageObjList | Pointer to a FSCRT_ARRAY structure that receives specific page objects whose handle is FSPDF_PAGEOBJECT. Application should call function FSCRT_Array_Init to initialize it and FSCRT_Array_Clear to release it. |
FS_RESULT FSPDF_PageObjects_InsertObject | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECTS | pageObjs, | ||
FS_INT32 | typeFilter, | ||
FS_INT32 | index, | ||
FSPDF_PAGEOBJECT | pageObj | ||
) |
Insert a page object and it will be automatically freed.
If parameter typeFilter is FSPDF_PAGEOBJECT_ALL, parameter index is for all page objects.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObjs | Handle to a FSPDF_PAGEOBJECTS object which is the page objects. It should be valid. |
[in] | typeFilter | A filter flag for the type of page objects. Please refer to macro definitions FSPDF_PAGEOBJECT_XXX and this should be one of these macros. |
[in] | index | Index of page object. Range: 0 to (objcount-1). objcount is returned by function FSPDF_PageObjects_CountObjects. If index is larger than (objcount-1), pageObj will be inserted to be the last one. if index is smaller than 0, pageObj will be inserted to be the first one. |
[in] | pageObj | Handle to a FSPDF_PAGEOBJECT object which is a page object. It should be valid. |
FS_RESULT FSPDF_PageObjects_RemoveObject | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECTS | pageObjs, | ||
FSPDF_PAGEOBJECT | pageObj | ||
) |
Remove a page object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pageObjs | Handle to a FSPDF_PAGEOBJECTS object which is the page objects. It should be valid. |
[in] | pageObj | Handle to a FSPDF_PAGEOBJECT object which is one page object. It should be valid. |
FS_RESULT FSPDF_PathObject_ConvertFromTextObject | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT * | convertedObj | ||
) |
Convert text object to path object for avoiding print deviation.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in,out] | convertedObj | Pointer to a FSPDF_PAGEOBJECT object. It should be valid. When this function is called, it is a text object. When this function returns, it receives the path object. |
FS_RESULT FSPDF_PathObject_Create | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT * | pathObj | ||
) |
Create a new path object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[out] | pathObj | Pointer to a FSPDF_PAGEOBJECT object that receives the newly created path object. If there is any error, it will be NULL. |
FS_RESULT FSPDF_PathObject_GetFillMode | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | pathObj, | ||
FS_INT32 * | fillMode | ||
) |
Get fill mode of a path object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pathObj | Handle to a FSPDF_PAGEOBJECT object which is a path object. It should be valid. |
[out] | fillMode | Pointer to a FS_INT32 object that receives the fill mode. Please refer to macro definitions FSCRT_FILLMODE_XXX and this would be one of these macros. If there is any error, it will be set FSCRT_FILLMODE_NONE. |
FS_RESULT FSPDF_PathObject_GetPathData | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | pathObj, | ||
FSCRT_PATHDATA * | pathData | ||
) |
Get of path data of a path object .
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pathObj | Handle to a FSPDF_PAGEOBJECT object which is a path object. It should be valid. |
[out] | pathData | Handle to a FSCRT_PATHDATA handle that receives path data. When this is not used any more, application should release this handle by calling function FSCRT_PathData_Release. |
FS_RESULT FSPDF_PathObject_GetStrokeState | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | pathObj, | ||
FS_BOOL * | isStroke | ||
) |
Get stroke state of a path object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pathObj | Handle to a FSPDF_PAGEOBJECT object which is a path object. It should be valid. |
[out] | isStroke | Pointer to a FS_BOOL object that receives a boolean value to indicate stroke state of path object:
|
FS_RESULT FSPDF_PathObject_SetFillMode | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | pathObj, | ||
FS_INT32 | fillMode | ||
) |
Set fill mode of a path object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pathObj | Handle to a FSPDF_PAGEOBJECT object which is a path object. It should be valid. |
[in] | fillMode | Please refer to macro definitions FSCRT_FILLMODE_XXX and this should be one of these macros. |
FS_RESULT FSPDF_PathObject_SetPathData | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | pathObj, | ||
FSCRT_PATHDATA | pathData | ||
) |
Set path data of a path object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pathObj | Handle to a FSPDF_PAGEOBJECT object which is a path object. It should be valid. |
[in] | pathData | Handle to a FSCRT_PATHDATA object to be set. |
FS_RESULT FSPDF_PathObject_SetStrokeState | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | pathObj, | ||
FS_BOOL | isStroke | ||
) |
Set stroke state of a path object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | pathObj | Handle to a FSPDF_PAGEOBJECT object which is a path object. It should be valid. |
[in] | isStroke | A FS_BOOL value that specifies the stroke state:
|
FS_RESULT FSPDF_ShadingObject_GetShading | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | shadingObj, | ||
FSPDF_OBJECT * | shadingPDFObj | ||
) |
Get the PDF shading dictionary or stream object of a shading page object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | shadingObj | Handle to a FSPDF_PAGEOBJECT object which is a shading object. It should be valid. |
[out] | shadingPDFObj | Pointer to a FSPDF_OBJECT handle that receives the shading PDF object, it would be a dictionary or stream object. If there is any error, it will be set NULL. |
FS_RESULT FSPDF_TextObject_Create | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT * | textObj | ||
) |
Create a new text Object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[out] | textObj | Pointer to a FSPDF_PAGEOBJECT handle that receives the newly created text object. If there is any error, it will be NULL. |
FS_RESULT FSPDF_TextObject_GetTextState | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | textObj, | ||
FSPDF_TEXTSTATE * | textState | ||
) |
Get text states of a text object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | textObj | Handle to a FSPDF_PAGEOBJECT object which is a text object. It should be valid. |
[out] | textState | Pointer to a FSPDF_TEXTSTATE structure that receives text state. |
FS_RESULT FSPDF_TextObject_GetUnicodeString | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | textObj, | ||
FSCRT_BSTR * | unicodeStr | ||
) |
Get unicode string of a text object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | textObj | Handle to a FSPDF_PAGEOBJECT object which is a text object. It should be valid. |
[out] | unicodeStr | Pointer to a FSCRT_BSTR structure that receives the unicode string, and it should not be NULL. The result will be in UTF-8. If there is any error, FSCRT_BSTR::str will be set empty if it is not NULL, and FSCRT_BSTR::len will be set 0. |
FS_RESULT FSPDF_TextObject_SetTextState | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | textObj, | ||
const FSPDF_TEXTSTATE * | textState, | ||
FS_BOOL | italic, | ||
FS_INT32 | weight | ||
) |
Set text states of a text object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | textObj | Handle to a FSPDF_PAGEOBJECT object which is a text object. It should be valid. |
[in] | textState | Pointer to a FSPDF_TEXTSTATE structure to be set. |
[in] | italic | A boolean value which indicates whether the set text is italic or not. |
[in] | weight | Original font weight, if larger than 500 it indicates bold. |
FS_RESULT FSPDF_TextObject_SetUnicodeString | ( | FSCRT_PAGE | page, |
FSPDF_PAGEOBJECT | textObj, | ||
const FSCRT_BSTR * | unicodeStr | ||
) |
Set unicode string for a text object.
[in] | page | Handle to a FSCRT_PAGE object which is a PDF page. It should be valid. |
[in] | textObj | Handle to a FSPDF_PAGEOBJECT object which is a text object. It should be valid. |
[in] | unicodeStr | Pointer to a FSCRT_BSTR structure to be set. It should be in UTF-8 format. |