PDF Toolbox
Loading...
Searching...
No Matches
Macros | Functions
PdfTools_Toolbox_PtxPdfStructure.h File Reference
#include "PdfTools_Toolbox_Types.h"
#include "PdfTools_Toolbox_PtxSys.h"

Go to the source code of this file.

Macros

#define PDFTOOLS_TOOLBOX_CALL
 
#define PtxPdfStructure_RoleMap_Get   PtxPdfStructure_RoleMap_GetA
 
#define PtxPdfStructure_RoleMap_GetKey   PtxPdfStructure_RoleMap_GetKeyA
 
#define PtxPdfStructure_RoleMap_GetValue   PtxPdfStructure_RoleMap_GetValueA
 
#define PtxPdfStructure_RoleMap_Set   PtxPdfStructure_RoleMap_SetA
 
#define PtxPdfStructure_RoleMap_SetValue   PtxPdfStructure_RoleMap_SetValueA
 
#define PtxPdfStructure_Node_New   PtxPdfStructure_Node_NewA
 
#define PtxPdfStructure_Node_GetTag   PtxPdfStructure_Node_GetTagA
 
#define PtxPdfStructure_Node_SetTag   PtxPdfStructure_Node_SetTagA
 
#define PtxPdfStructure_Node_GetAlternateText   PtxPdfStructure_Node_GetAlternateTextA
 
#define PtxPdfStructure_Node_SetAlternateText   PtxPdfStructure_Node_SetAlternateTextA
 

Functions

PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_GetCount (TPtxPdfStructure_RoleMap *pRoleMap)
 The number of key-value pairs in the map.
 
PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_GetSize (TPtxPdfStructure_RoleMap *pRoleMap)
 The number of key-value pairs in the map.
 
PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_GetBegin (TPtxPdfStructure_RoleMap *pRoleMap)
 Get the position of the first entry in the map.
 
PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_GetEnd (TPtxPdfStructure_RoleMap *pRoleMap)
 Get the end position of the map.
 
PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_GetNext (TPtxPdfStructure_RoleMap *pRoleMap, int it)
 Get the position of the next entry in the map.
 
PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_GetA (TPtxPdfStructure_RoleMap *pRoleMap, const char *szKey)
 Get the position of a key in the map. If no error occurred, then the position can be used to get the corresponding value with PtxPdfStructure_RoleMap_GetValue.
 
PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_GetW (TPtxPdfStructure_RoleMap *pRoleMap, const WCHAR *szKey)
 Get the position of a key in the map. If no error occurred, then the position can be used to get the corresponding value with PtxPdfStructure_RoleMap_GetValue.
 
PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_GetKeyA (TPtxPdfStructure_RoleMap *pRoleMap, int it, char *pBuffer, size_t nBufferSize)
 Get the key of the entry given a position.
 
PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_GetKeyW (TPtxPdfStructure_RoleMap *pRoleMap, int it, WCHAR *pBuffer, size_t nBufferSize)
 Get the key of the entry given a position.
 
PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_GetValueA (TPtxPdfStructure_RoleMap *pRoleMap, int it, char *pBuffer, size_t nBufferSize)
 Get the value of the entry given a position.
 
PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_GetValueW (TPtxPdfStructure_RoleMap *pRoleMap, int it, WCHAR *pBuffer, size_t nBufferSize)
 Get the value of the entry given a position.
 
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_SetA (TPtxPdfStructure_RoleMap *pRoleMap, const char *szKey, const char *szValue)
 Set the value of an entry for a given key. This operation invalidates all positions previously returned by‹pre›_‹map›_GetBegin, PtxPdfStructure_RoleMap_GetEnd, PtxPdfStructure_RoleMap_GetNext, and PtxPdfStructure_RoleMap_Get.
 
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_SetW (TPtxPdfStructure_RoleMap *pRoleMap, const WCHAR *szKey, const WCHAR *szValue)
 Set the value of an entry for a given key. This operation invalidates all positions previously returned by‹pre›_‹map›_GetBegin, PtxPdfStructure_RoleMap_GetEnd, PtxPdfStructure_RoleMap_GetNext, and PtxPdfStructure_RoleMap_Get.
 
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_SetValueA (TPtxPdfStructure_RoleMap *pRoleMap, int it, const char *szValue)
 Set the value of the entry at a position in the map.
 
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_SetValueW (TPtxPdfStructure_RoleMap *pRoleMap, int it, const WCHAR *szValue)
 Set the value of the entry at a position in the map.
 
PDFTOOLS_TOOLBOX_EXPORT TPtxPdfStructure_Node *PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_NewA (const char *szTag, TPtxPdf_Document *pDocument, TPtxPdf_Page *pPage)
 
PDFTOOLS_TOOLBOX_EXPORT TPtxPdfStructure_Node *PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_NewW (const WCHAR *szTag, TPtxPdf_Document *pDocument, TPtxPdf_Page *pPage)
 
PDFTOOLS_TOOLBOX_EXPORT TPtxPdfStructure_Node *PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_GetParent (TPtxPdfStructure_Node *pNode)
 
PDFTOOLS_TOOLBOX_EXPORT TPtxPdfStructure_NodeList *PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_GetChildren (TPtxPdfStructure_Node *pNode)
 
PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_GetTagA (TPtxPdfStructure_Node *pNode, char *pBuffer, size_t nBufferSize)
 
PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_GetTagW (TPtxPdfStructure_Node *pNode, WCHAR *pBuffer, size_t nBufferSize)
 
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_SetTagA (TPtxPdfStructure_Node *pNode, const char *szTag)
 
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_SetTagW (TPtxPdfStructure_Node *pNode, const WCHAR *szTag)
 
PDFTOOLS_TOOLBOX_EXPORT TPtxPdf_Page *PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_GetPage (TPtxPdfStructure_Node *pNode)
 
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_SetPage (TPtxPdfStructure_Node *pNode, TPtxPdf_Page *pPage)
 
PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_GetAlternateTextA (TPtxPdfStructure_Node *pNode, char *pBuffer, size_t nBufferSize)
 
PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_GetAlternateTextW (TPtxPdfStructure_Node *pNode, WCHAR *pBuffer, size_t nBufferSize)
 
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_SetAlternateTextA (TPtxPdfStructure_Node *pNode, const char *szAlternateText)
 
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_SetAlternateTextW (TPtxPdfStructure_Node *pNode, const WCHAR *szAlternateText)
 
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_GetBoundingBox (TPtxPdfStructure_Node *pNode, TPtxGeomReal_Rectangle *pBoundingBox)
 Bounding box for contents - should only be set for Figure, Formula and Table.
 
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_SetBoundingBox (TPtxPdfStructure_Node *pNode, const TPtxGeomReal_Rectangle *pBoundingBox)
 Bounding box for contents - should only be set for Figure, Formula and Table.
 
PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_NodeList_GetCount (TPtxPdfStructure_NodeList *pNodeList)
 Get the number of elements in the list.
 
PDFTOOLS_TOOLBOX_EXPORT TPtxPdfStructure_Node *PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_NodeList_Get (TPtxPdfStructure_NodeList *pNodeList, int iIndex)
 Returns the element at the specified position in the given list.
 
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_NodeList_Add (TPtxPdfStructure_NodeList *pNodeList, TPtxPdfStructure_Node *pNode)
 Add an element to the end of the list.
 
PDFTOOLS_TOOLBOX_EXPORT TPtxPdfStructure_Tree *PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Tree_New (TPtxPdf_Document *pDocument)
 
PDFTOOLS_TOOLBOX_EXPORT TPtxPdfStructure_Node *PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Tree_GetDocumentNode (TPtxPdfStructure_Tree *pTree)
 
PDFTOOLS_TOOLBOX_EXPORT TPtxPdfStructure_RoleMap *PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Tree_GetRoleMap (TPtxPdfStructure_Tree *pTree)
 

Macro Definition Documentation

◆ PDFTOOLS_TOOLBOX_CALL

#define PDFTOOLS_TOOLBOX_CALL

◆ PtxPdfStructure_Node_GetAlternateText

#define PtxPdfStructure_Node_GetAlternateText   PtxPdfStructure_Node_GetAlternateTextA

◆ PtxPdfStructure_Node_GetTag

#define PtxPdfStructure_Node_GetTag   PtxPdfStructure_Node_GetTagA

◆ PtxPdfStructure_Node_New

#define PtxPdfStructure_Node_New   PtxPdfStructure_Node_NewA

◆ PtxPdfStructure_Node_SetAlternateText

#define PtxPdfStructure_Node_SetAlternateText   PtxPdfStructure_Node_SetAlternateTextA

◆ PtxPdfStructure_Node_SetTag

#define PtxPdfStructure_Node_SetTag   PtxPdfStructure_Node_SetTagA

◆ PtxPdfStructure_RoleMap_Get

#define PtxPdfStructure_RoleMap_Get   PtxPdfStructure_RoleMap_GetA

◆ PtxPdfStructure_RoleMap_GetKey

#define PtxPdfStructure_RoleMap_GetKey   PtxPdfStructure_RoleMap_GetKeyA

◆ PtxPdfStructure_RoleMap_GetValue

#define PtxPdfStructure_RoleMap_GetValue   PtxPdfStructure_RoleMap_GetValueA

◆ PtxPdfStructure_RoleMap_Set

#define PtxPdfStructure_RoleMap_Set   PtxPdfStructure_RoleMap_SetA

◆ PtxPdfStructure_RoleMap_SetValue

#define PtxPdfStructure_RoleMap_SetValue   PtxPdfStructure_RoleMap_SetValueA

Function Documentation

◆ PtxPdfStructure_Node_GetAlternateTextA()

PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_GetAlternateTextA ( TPtxPdfStructure_Node * pNode,
char * pBuffer,
size_t nBufferSize )

Alternate text to be used where the content denoted by the structure element and its children cannot be rendered because of accessibility or other concerns.

Parameters
[in,out]pNodeActs as a handle to the native object of type TPtxPdfStructure_Node.
[out]pBufferRetrieved value. To determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if either an error occurred or the returned buffer is actually NULL. To determine if an error has occurred, check the error code as described in the note section below.
Note
An error occurred when 0 was returned and the error code returned by Ptx_GetLastError is different from ePtx_Error_Success. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_Node_GetAlternateTextW()

PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_GetAlternateTextW ( TPtxPdfStructure_Node * pNode,
WCHAR * pBuffer,
size_t nBufferSize )

Alternate text to be used where the content denoted by the structure element and its children cannot be rendered because of accessibility or other concerns.

Parameters
[in,out]pNodeActs as a handle to the native object of type TPtxPdfStructure_Node.
[out]pBufferRetrieved value. To determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if either an error occurred or the returned buffer is actually NULL. To determine if an error has occurred, check the error code as described in the note section below.
Note
An error occurred when 0 was returned and the error code returned by Ptx_GetLastError is different from ePtx_Error_Success. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_Node_GetBoundingBox()

PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_GetBoundingBox ( TPtxPdfStructure_Node * pNode,
TPtxGeomReal_Rectangle * pBoundingBox )

Bounding box for contents - should only be set for Figure, Formula and Table.

Parameters
[in,out]pNodeActs as a handle to the native object of type TPtxPdfStructure_Node.
[out]pBoundingBoxRetrieved value.
Returns
FALSE if either an error occurred or the [out] argument returns NULL. To determine if an error has occurred, check the error code as described in the note section below.
Note
An error occurred when FALSE was returned and the error code returned by Ptx_GetLastError is different from ePtx_Error_Success. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_Node_GetChildren()

The list of child nodes under this node in the structure element tree. Once child nodes have been added to a node, it can no longer be associated with marked content.

Parameters
[in,out]pNodeActs as a handle to the native object of type TPtxPdfStructure_Node.
Returns
Retrieved value.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_Node_GetPage()

The page on which marked content associated with the structure element node is to be found. This is optional, but is best omitted for nodes which are not associated with marked content.

Parameters
[in,out]pNodeActs as a handle to the native object of type TPtxPdfStructure_Node.
Returns
Retrieved value.

NULL if either an error occurred or the returned object is actually NULL. To determine if an error has occurred, check the error code as described in the note section below.

Note
An error occurred when NULL was returned and the error code returned by Ptx_GetLastError is different from ePtx_Error_Success. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_Node_GetParent()

The parent node in the structure element tree.

Parameters
[in,out]pNodeActs as a handle to the native object of type TPtxPdfStructure_Node.
Returns
Retrieved value.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_Node_GetTagA()

PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_GetTagA ( TPtxPdfStructure_Node * pNode,
char * pBuffer,
size_t nBufferSize )

Tags should conform to the Standard Structure Types described within the PDF standard.

Parameters
[in,out]pNodeActs as a handle to the native object of type TPtxPdfStructure_Node.
[out]pBufferRetrieved value. To determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if there is an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_Node_GetTagW()

PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_GetTagW ( TPtxPdfStructure_Node * pNode,
WCHAR * pBuffer,
size_t nBufferSize )

Tags should conform to the Standard Structure Types described within the PDF standard.

Parameters
[in,out]pNodeActs as a handle to the native object of type TPtxPdfStructure_Node.
[out]pBufferRetrieved value. To determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if there is an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_Node_NewA()

PDFTOOLS_TOOLBOX_EXPORT TPtxPdfStructure_Node *PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_NewA ( const char * szTag,
TPtxPdf_Document * pDocument,
TPtxPdf_Page * pPage )
Parameters
[in]szTagTags should conform to the Standard Structure Types described within the PDF standard or refer to entries in the RoleMap. Allowed values from the PDF standard are: Document, Part, Sect, Art, Div, H1, H2, H3, H4, H5, H6, P, L, LI, Lbl, LBody, Table, TR, TH, TD, THead, TBody, TFoot, Span, Quote, Note, Reference, Figure, Caption, Artifact, Form, Field, Link, Code, Annot, Ruby, Warichu, TOC, TOCI, Index and BibEntry.
[in,out]pDocumentThe document containing the structure element tree.
[in,out]pPageThe page on which marked content associated with the structure element node is to be found. This is optional, but is best omitted for nodes which are not associated with marked content.
Returns
Handle to the newly created native object.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_Node_NewW()

PDFTOOLS_TOOLBOX_EXPORT TPtxPdfStructure_Node *PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_NewW ( const WCHAR * szTag,
TPtxPdf_Document * pDocument,
TPtxPdf_Page * pPage )
Parameters
[in]szTagTags should conform to the Standard Structure Types described within the PDF standard or refer to entries in the RoleMap. Allowed values from the PDF standard are: Document, Part, Sect, Art, Div, H1, H2, H3, H4, H5, H6, P, L, LI, Lbl, LBody, Table, TR, TH, TD, THead, TBody, TFoot, Span, Quote, Note, Reference, Figure, Caption, Artifact, Form, Field, Link, Code, Annot, Ruby, Warichu, TOC, TOCI, Index and BibEntry.
[in,out]pDocumentThe document containing the structure element tree.
[in,out]pPageThe page on which marked content associated with the structure element node is to be found. This is optional, but is best omitted for nodes which are not associated with marked content.
Returns
Handle to the newly created native object.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_Node_SetAlternateTextA()

PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_SetAlternateTextA ( TPtxPdfStructure_Node * pNode,
const char * szAlternateText )

Alternate text to be used where the content denoted by the structure element and its children cannot be rendered because of accessibility or other concerns.

Parameters
[in,out]pNodeActs as a handle to the native object of type TPtxPdfStructure_Node.
[in]szAlternateTextSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_Node_SetAlternateTextW()

PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_SetAlternateTextW ( TPtxPdfStructure_Node * pNode,
const WCHAR * szAlternateText )

Alternate text to be used where the content denoted by the structure element and its children cannot be rendered because of accessibility or other concerns.

Parameters
[in,out]pNodeActs as a handle to the native object of type TPtxPdfStructure_Node.
[in]szAlternateTextSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_Node_SetBoundingBox()

PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_SetBoundingBox ( TPtxPdfStructure_Node * pNode,
const TPtxGeomReal_Rectangle * pBoundingBox )

Bounding box for contents - should only be set for Figure, Formula and Table.

Parameters
[in,out]pNodeActs as a handle to the native object of type TPtxPdfStructure_Node.
[in]pBoundingBoxSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_Node_SetPage()

PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_SetPage ( TPtxPdfStructure_Node * pNode,
TPtxPdf_Page * pPage )

The page on which marked content associated with the structure element node is to be found. This is optional, but is best omitted for nodes which are not associated with marked content.

Parameters
[in,out]pNodeActs as a handle to the native object of type TPtxPdfStructure_Node.
[in,out]pPageSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_Node_SetTagA()

PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_SetTagA ( TPtxPdfStructure_Node * pNode,
const char * szTag )

Tags should conform to the Standard Structure Types described within the PDF standard.

Parameters
[in,out]pNodeActs as a handle to the native object of type TPtxPdfStructure_Node.
[in]szTagSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_Node_SetTagW()

PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_SetTagW ( TPtxPdfStructure_Node * pNode,
const WCHAR * szTag )

Tags should conform to the Standard Structure Types described within the PDF standard.

Parameters
[in,out]pNodeActs as a handle to the native object of type TPtxPdfStructure_Node.
[in]szTagSet value.
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_NodeList_Add()

Add an element to the end of the list.

Parameters
[in,out]pNodeListActs as a handle to the native object of type TPtxPdfStructure_NodeList.
[in,out]pNode
Returns
May indicate an error in certain scenarios. For further information see the note section below.
Note
An error occurred when FALSE was returned and the error code returned by Ptx_GetLastError is different from ePtx_Error_Success. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_NodeList_Get()

PDFTOOLS_TOOLBOX_EXPORT TPtxPdfStructure_Node *PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_NodeList_Get ( TPtxPdfStructure_NodeList * pNodeList,
int iIndex )

Returns the element at the specified position in the given list.

Parameters
[in,out]pNodeListActs as a handle to the native object of type TPtxPdfStructure_NodeList.
[in]iIndex
Returns
NULL if there is an error.
Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_NodeList_GetCount()

PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_NodeList_GetCount ( TPtxPdfStructure_NodeList * pNodeList)

Get the number of elements in the list.

Parameters
[in,out]pNodeListActs as a handle to the native object of type TPtxPdfStructure_NodeList.
Returns
May indicate an error in certain scenarios. For further information see the note section below.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_RoleMap_GetA()

PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_GetA ( TPtxPdfStructure_RoleMap * pRoleMap,
const char * szKey )

Get the position of a key in the map. If no error occurred, then the position can be used to get the corresponding value with PtxPdfStructure_RoleMap_GetValue.

Parameters
[in,out]pRoleMapActs as a handle to the native object of type TPtxPdfStructure_RoleMap.
[in]szKey
Returns
May indicate an error in certain scenarios. For further information see the note section below.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_RoleMap_GetBegin()

PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_GetBegin ( TPtxPdfStructure_RoleMap * pRoleMap)

Get the position of the first entry in the map.

The order of the entries is arbitrary and not significant.

If the returned position differs from PtxPdfStructure_RoleMap_GetEnd,then the position can be used to retrieve the map entry with PtxPdfStructure_RoleMap_GetKey, PtxPdfStructure_RoleMap_GetValue.

Use PtxPdfStructure_RoleMap_GetNext to get the position of the next entry.

Parameters
[in,out]pRoleMapActs as a handle to the native object of type TPtxPdfStructure_RoleMap.
Returns
May indicate an error in certain scenarios. For further information see the note section below.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_RoleMap_GetCount()

PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_GetCount ( TPtxPdfStructure_RoleMap * pRoleMap)

The number of key-value pairs in the map.

Parameters
[in,out]pRoleMapActs as a handle to the native object of type TPtxPdfStructure_RoleMap.
Returns
May indicate an error in certain scenarios. For further information see the note section below.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_RoleMap_GetEnd()

PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_GetEnd ( TPtxPdfStructure_RoleMap * pRoleMap)

Get the end position of the map.

This position does not correspond to an actual entry in the map.

It must be used to determine whether the end of the map has been reached when using PtxPdfStructure_RoleMap_GetBegin and PtxPdfStructure_RoleMap_GetNext.

Parameters
[in,out]pRoleMapActs as a handle to the native object of type TPtxPdfStructure_RoleMap.
Returns
May indicate an error in certain scenarios. For further information see the note section below.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_RoleMap_GetKeyA()

PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_GetKeyA ( TPtxPdfStructure_RoleMap * pRoleMap,
int it,
char * pBuffer,
size_t nBufferSize )

Get the key of the entry given a position.

Parameters
[in,out]pRoleMapActs as a handle to the native object of type TPtxPdfStructure_RoleMap.
[in]it
[out]pBufferTo determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if there is an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_RoleMap_GetKeyW()

PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_GetKeyW ( TPtxPdfStructure_RoleMap * pRoleMap,
int it,
WCHAR * pBuffer,
size_t nBufferSize )

Get the key of the entry given a position.

Parameters
[in,out]pRoleMapActs as a handle to the native object of type TPtxPdfStructure_RoleMap.
[in]it
[out]pBufferTo determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if there is an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_RoleMap_GetNext()

PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_GetNext ( TPtxPdfStructure_RoleMap * pRoleMap,
int it )

Get the position of the next entry in the map.

The order of the entries is arbitrary and not significant.

If the returned position differs from PtxPdfStructure_RoleMap_GetEnd, then the position can be used to retrieve the map entry with PtxPdfStructure_RoleMap_GetKey and PtxPdfStructure_RoleMap_GetValue.

Parameters
[in,out]pRoleMapActs as a handle to the native object of type TPtxPdfStructure_RoleMap.
[in]it
Returns
May indicate an error in certain scenarios. For further information see the note section below.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_RoleMap_GetSize()

PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_GetSize ( TPtxPdfStructure_RoleMap * pRoleMap)

The number of key-value pairs in the map.

Parameters
[in,out]pRoleMapActs as a handle to the native object of type TPtxPdfStructure_RoleMap.
Returns
May indicate an error in certain scenarios. For further information see the note section below.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:
Deprecated
Deprecated in Version 1.1.0.

◆ PtxPdfStructure_RoleMap_GetValueA()

PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_GetValueA ( TPtxPdfStructure_RoleMap * pRoleMap,
int it,
char * pBuffer,
size_t nBufferSize )

Get the value of the entry given a position.

Parameters
[in,out]pRoleMapActs as a handle to the native object of type TPtxPdfStructure_RoleMap.
[in]it
[out]pBufferTo determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if there is an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_RoleMap_GetValueW()

PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_GetValueW ( TPtxPdfStructure_RoleMap * pRoleMap,
int it,
WCHAR * pBuffer,
size_t nBufferSize )

Get the value of the entry given a position.

Parameters
[in,out]pRoleMapActs as a handle to the native object of type TPtxPdfStructure_RoleMap.
[in]it
[out]pBufferTo determine the required buffer size, the function has to be called with NULL. The return value of this function specifies the buffer size.
[in]nBufferSizeThe buffer size of the retrieved string pBuffer.
Returns
The amount of data written to the buffer pBuffer. 0 if there is an error.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_RoleMap_GetW()

PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_GetW ( TPtxPdfStructure_RoleMap * pRoleMap,
const WCHAR * szKey )

Get the position of a key in the map. If no error occurred, then the position can be used to get the corresponding value with PtxPdfStructure_RoleMap_GetValue.

Parameters
[in,out]pRoleMapActs as a handle to the native object of type TPtxPdfStructure_RoleMap.
[in]szKey
Returns
May indicate an error in certain scenarios. For further information see the note section below.
Note
An error occurred when 0 was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_RoleMap_SetA()

PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_SetA ( TPtxPdfStructure_RoleMap * pRoleMap,
const char * szKey,
const char * szValue )

Set the value of an entry for a given key. This operation invalidates all positions previously returned by‹pre›_‹map›_GetBegin, PtxPdfStructure_RoleMap_GetEnd, PtxPdfStructure_RoleMap_GetNext, and PtxPdfStructure_RoleMap_Get.

Parameters
[in,out]pRoleMapActs as a handle to the native object of type TPtxPdfStructure_RoleMap.
[in]szKey
[in]szValue
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_RoleMap_SetValueA()

PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_SetValueA ( TPtxPdfStructure_RoleMap * pRoleMap,
int it,
const char * szValue )

Set the value of the entry at a position in the map.

Parameters
[in,out]pRoleMapActs as a handle to the native object of type TPtxPdfStructure_RoleMap.
[in]it
[in]szValue
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_RoleMap_SetValueW()

PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_SetValueW ( TPtxPdfStructure_RoleMap * pRoleMap,
int it,
const WCHAR * szValue )

Set the value of the entry at a position in the map.

Parameters
[in,out]pRoleMapActs as a handle to the native object of type TPtxPdfStructure_RoleMap.
[in]it
[in]szValue
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_RoleMap_SetW()

PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_SetW ( TPtxPdfStructure_RoleMap * pRoleMap,
const WCHAR * szKey,
const WCHAR * szValue )

Set the value of an entry for a given key. This operation invalidates all positions previously returned by‹pre›_‹map›_GetBegin, PtxPdfStructure_RoleMap_GetEnd, PtxPdfStructure_RoleMap_GetNext, and PtxPdfStructure_RoleMap_Get.

Parameters
[in,out]pRoleMapActs as a handle to the native object of type TPtxPdfStructure_RoleMap.
[in]szKey
[in]szValue
Returns
TRUE if the operation is successful; FALSE if there is an error.
Note
An error occurred when FALSE was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_Tree_GetDocumentNode()

The document node at the top of the structure element tree.

Parameters
[in,out]pTreeActs as a handle to the native object of type TPtxPdfStructure_Tree.
Returns
Retrieved value.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:

◆ PtxPdfStructure_Tree_GetRoleMap()

The rolemap for structure elements in the structure tree. If this does not exist it will be created.

Parameters
[in,out]pTreeActs as a handle to the native object of type TPtxPdfStructure_Tree.
Returns
Retrieved value.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage.

◆ PtxPdfStructure_Tree_New()

Creates a new StructTreeRoot and adds a root-level “Document” node

Parameters
[in,out]pDocumentthe output document with which the returned structure tree is associated
Returns
Handle to the newly created native object.

NULL if there is an error.

Note
An error occurred when NULL was returned. Retrieve specific error code by calling Ptx_GetLastError. Get the error message with Ptx_GetLastErrorMessage. Possible error codes:
  • ePtx_Error_IllegalArgument if the document is invalid, or an input document, or a document where logical structure has been potentially copied from an existing document already