PDF Toolbox
Loading...
Searching...
No Matches
PdfTools_Toolbox_PtxPdfStructure.h
Go to the documentation of this file.
1/******************************************************************************
2 *
3 * File: PdfTools_Toolbox_PtxPdfStructure.h
4 *
5 * Description: Sub Header file for Toolbox SDK
6 *
7 * Author: PDF Tools AG
8 *
9 * Copyright: Copyright (C) 2024 - 2025 PDF Tools AG, Switzerland
10 * All rights reserved.
11 *
12 * Notice: By downloading and using this artifact, you accept PDF Tools AG's
13 * [license agreement](https://www.pdf-tools.com/license-agreement/),
14 * [privacy policy](https://www.pdf-tools.com/privacy-policy/),
15 * and allow PDF Tools AG to track your usage data.
16 *
17 *****************************************************************************/
18
19#ifndef PDFTOOLS_TOOLBOX_PTXPDFSTRUCTURE_H__
20#define PDFTOOLS_TOOLBOX_PTXPDFSTRUCTURE_H__
21
22#ifndef PDFTOOLS_TOOLBOX_CALL
23#if defined(WIN32)
24#define PDFTOOLS_TOOLBOX_CALL __stdcall
25#else
26#define PDFTOOLS_TOOLBOX_CALL
27#endif
28#endif
29
32
33#ifdef __cplusplus
34extern "C"
35{
36#endif
37
38#ifdef _UNICODE
39#define PtxPdfStructure_RoleMap_Get PtxPdfStructure_RoleMap_GetW
40#define PtxPdfStructure_RoleMap_GetKey PtxPdfStructure_RoleMap_GetKeyW
41#define PtxPdfStructure_RoleMap_GetValue PtxPdfStructure_RoleMap_GetValueW
42#define PtxPdfStructure_RoleMap_Set PtxPdfStructure_RoleMap_SetW
43#define PtxPdfStructure_RoleMap_SetValue PtxPdfStructure_RoleMap_SetValueW
44
45#define PtxPdfStructure_Node_New PtxPdfStructure_Node_NewW
46#define PtxPdfStructure_Node_GetStringAttribute PtxPdfStructure_Node_GetStringAttributeW
47#define PtxPdfStructure_Node_SetStringAttribute PtxPdfStructure_Node_SetStringAttributeW
48
49#define PtxPdfStructure_Node_GetTag PtxPdfStructure_Node_GetTagW
50#define PtxPdfStructure_Node_SetTag PtxPdfStructure_Node_SetTagW
51#define PtxPdfStructure_Node_GetAlternateText PtxPdfStructure_Node_GetAlternateTextW
52#define PtxPdfStructure_Node_SetAlternateText PtxPdfStructure_Node_SetAlternateTextW
53#define PtxPdfStructure_Node_GetActualText PtxPdfStructure_Node_GetActualTextW
54#define PtxPdfStructure_Node_SetActualText PtxPdfStructure_Node_SetActualTextW
55#define PtxPdfStructure_Node_GetLanguage PtxPdfStructure_Node_GetLanguageW
56#define PtxPdfStructure_Node_SetLanguage PtxPdfStructure_Node_SetLanguageW
57#define PtxPdfStructure_Node_GetAbbreviation PtxPdfStructure_Node_GetAbbreviationW
58#define PtxPdfStructure_Node_SetAbbreviation PtxPdfStructure_Node_SetAbbreviationW
59
60#else
61#define PtxPdfStructure_RoleMap_Get PtxPdfStructure_RoleMap_GetA
62#define PtxPdfStructure_RoleMap_GetKey PtxPdfStructure_RoleMap_GetKeyA
63#define PtxPdfStructure_RoleMap_GetValue PtxPdfStructure_RoleMap_GetValueA
64#define PtxPdfStructure_RoleMap_Set PtxPdfStructure_RoleMap_SetA
65#define PtxPdfStructure_RoleMap_SetValue PtxPdfStructure_RoleMap_SetValueA
66
67#define PtxPdfStructure_Node_New PtxPdfStructure_Node_NewA
68#define PtxPdfStructure_Node_GetStringAttribute PtxPdfStructure_Node_GetStringAttributeA
69#define PtxPdfStructure_Node_SetStringAttribute PtxPdfStructure_Node_SetStringAttributeA
70
71#define PtxPdfStructure_Node_GetTag PtxPdfStructure_Node_GetTagA
72#define PtxPdfStructure_Node_SetTag PtxPdfStructure_Node_SetTagA
73#define PtxPdfStructure_Node_GetAlternateText PtxPdfStructure_Node_GetAlternateTextA
74#define PtxPdfStructure_Node_SetAlternateText PtxPdfStructure_Node_SetAlternateTextA
75#define PtxPdfStructure_Node_GetActualText PtxPdfStructure_Node_GetActualTextA
76#define PtxPdfStructure_Node_SetActualText PtxPdfStructure_Node_SetActualTextA
77#define PtxPdfStructure_Node_GetLanguage PtxPdfStructure_Node_GetLanguageA
78#define PtxPdfStructure_Node_SetLanguage PtxPdfStructure_Node_SetLanguageA
79#define PtxPdfStructure_Node_GetAbbreviation PtxPdfStructure_Node_GetAbbreviationA
80#define PtxPdfStructure_Node_SetAbbreviation PtxPdfStructure_Node_SetAbbreviationA
81
82#endif
83
84/******************************************************************************
85 * RoleMap
86 *****************************************************************************/
177 int it);
198 const char* szKey);
219 const WCHAR* szKey);
242 int it, char* pBuffer,
243 size_t nBufferSize);
266 int it, WCHAR* pBuffer,
267 size_t nBufferSize);
290PtxPdfStructure_RoleMap_GetValueA(TPtxPdfStructure_RoleMap* pRoleMap, int it, char* pBuffer, size_t nBufferSize);
313PtxPdfStructure_RoleMap_GetValueW(TPtxPdfStructure_RoleMap* pRoleMap, int it, WCHAR* pBuffer, size_t nBufferSize);
334 const char* szKey, const char* szValue);
355 const WCHAR* szKey,
356 const WCHAR* szValue);
374 int it, const char* szValue);
392 int it, const WCHAR* szValue);
393
394/******************************************************************************
395 * Node
396 *****************************************************************************/
422PtxPdfStructure_Node_NewA(const char* szTag, TPtxPdf_Document* pDocument, TPtxPdf_Page* pPage);
449
475 TPtxPdfStructure_Node* pNode, const char* szKey, char* pBuffer, size_t nBufferSize);
501 TPtxPdfStructure_Node* pNode, const WCHAR* szKey, WCHAR* pBuffer, size_t nBufferSize);
520PtxPdfStructure_Node_SetStringAttributeA(TPtxPdfStructure_Node* pNode, const char* szKey, const char* szValue);
540
607 char* pBuffer, size_t nBufferSize);
633 WCHAR* pBuffer, size_t nBufferSize);
654 const char* szTag);
675 const WCHAR* szTag);
716 TPtxPdf_Page* pPage);
742PtxPdfStructure_Node_GetAlternateTextA(TPtxPdfStructure_Node* pNode, char* pBuffer, size_t nBufferSize);
787 const char* szAlternateText);
806 const WCHAR* szAlternateText);
831 char* pBuffer,
832 size_t nBufferSize);
857 WCHAR* pBuffer,
858 size_t nBufferSize);
876 const char* szActualText);
894 const WCHAR* szActualText);
919 char* pBuffer,
920 size_t nBufferSize);
945 WCHAR* pBuffer,
946 size_t nBufferSize);
964 const char* szLanguage);
982 const WCHAR* szLanguage);
1008 char* pBuffer,
1009 size_t nBufferSize);
1035 WCHAR* pBuffer,
1036 size_t nBufferSize);
1055 const char* szAbbreviation);
1074 const WCHAR* szAbbreviation);
1115
1116/******************************************************************************
1117 * NodeList
1118 *****************************************************************************/
1167 TPtxPdfStructure_Node* pNode);
1168
1169/******************************************************************************
1170 * Tree
1171 *****************************************************************************/
1191
1244
1245#ifdef __cplusplus
1246}
1247#endif
1248
1249#endif /* PDFTOOLS_TOOLBOX_PTXPDFSTRUCTURE_H__ */
#define PDFTOOLS_TOOLBOX_EXPORT
Definition PdfTools_Toolbox_Platform.h:143
unsigned short WCHAR
Definition PdfTools_Toolbox_Platform.h:95
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_SetTagA(TPtxPdfStructure_Node *pNode, const char *szTag)
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_SetLanguageA(TPtxPdfStructure_Node *pNode, const char *szLanguage)
PDFTOOLS_TOOLBOX_EXPORT TPtxPdfStructure_Node *PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_NewW(const WCHAR *szTag, TPtxPdf_Document *pDocument, TPtxPdf_Page *pPage)
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 BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_SetActualTextA(TPtxPdfStructure_Node *pNode, const char *szActualText)
PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_GetAbbreviationW(TPtxPdfStructure_Node *pNode, WCHAR *pBuffer, size_t nBufferSize)
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_Node_GetTagA(TPtxPdfStructure_Node *pNode, char *pBuffer, size_t nBufferSize)
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_Tree_GetDocumentNode(TPtxPdfStructure_Tree *pTree)
PDFTOOLS_TOOLBOX_EXPORT TPtxPdfStructure_Node *PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_GetParent(TPtxPdfStructure_Node *pNode)
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 return...
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_RoleMap_GetBegin(TPtxPdfStructure_RoleMap *pRoleMap)
Get the position of the first entry in the map.
PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_GetActualTextW(TPtxPdfStructure_Node *pNode, WCHAR *pBuffer, size_t nBufferSize)
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_SetPage(TPtxPdfStructure_Node *pNode, TPtxPdf_Page *pPage)
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_SetActualTextW(TPtxPdfStructure_Node *pNode, const WCHAR *szActualText)
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_SetLanguageW(TPtxPdfStructure_Node *pNode, const WCHAR *szLanguage)
PDFTOOLS_TOOLBOX_EXPORT TPtxPdf_Page *PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_GetPage(TPtxPdfStructure_Node *pNode)
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.
#define PDFTOOLS_TOOLBOX_CALL
Definition PdfTools_Toolbox_PtxPdfStructure.h:26
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_SetAbbreviationW(TPtxPdfStructure_Node *pNode, const WCHAR *szAbbreviation)
PDFTOOLS_TOOLBOX_EXPORT TPtxPdfStructure_NodeList *PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Tree_GetChildren(TPtxPdfStructure_Tree *pTree)
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 size_t PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_GetAlternateTextA(TPtxPdfStructure_Node *pNode, char *pBuffer, size_t nBufferSize)
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 return...
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 BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_SetStringAttributeA(TPtxPdfStructure_Node *pNode, const char *szKey, const char *szValue)
Set a string attribute.
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 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 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 BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_SetStringAttributeW(TPtxPdfStructure_Node *pNode, const WCHAR *szKey, const WCHAR *szValue)
Set a string attribute.
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_SetAbbreviationA(TPtxPdfStructure_Node *pNode, const char *szAbbreviation)
PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_GetStringAttributeW(TPtxPdfStructure_Node *pNode, const WCHAR *szKey, WCHAR *pBuffer, size_t nBufferSize)
Query a string attribute.
PDFTOOLS_TOOLBOX_EXPORT TPtxPdfStructure_Node *PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_NewA(const char *szTag, TPtxPdf_Document *pDocument, TPtxPdf_Page *pPage)
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_SetAlternateTextA(TPtxPdfStructure_Node *pNode, const char *szAlternateText)
PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_GetAbbreviationA(TPtxPdfStructure_Node *pNode, char *pBuffer, size_t nBufferSize)
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 TPtxPdfStructure_RoleMap *PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Tree_GetRoleMap(TPtxPdfStructure_Tree *pTree)
PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_GetTagW(TPtxPdfStructure_Node *pNode, WCHAR *pBuffer, size_t nBufferSize)
PDFTOOLS_TOOLBOX_EXPORT int PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_RoleMap_GetEnd(TPtxPdfStructure_RoleMap *pRoleMap)
Get the end position of the map.
PDFTOOLS_TOOLBOX_EXPORT TPtxPdfStructure_Tree *PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Tree_New(TPtxPdf_Document *pDocument)
PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_GetLanguageA(TPtxPdfStructure_Node *pNode, char *pBuffer, size_t nBufferSize)
PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_GetLanguageW(TPtxPdfStructure_Node *pNode, WCHAR *pBuffer, size_t nBufferSize)
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 ...
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 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 ...
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_SetAlternateTextW(TPtxPdfStructure_Node *pNode, const WCHAR *szAlternateText)
PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_GetActualTextA(TPtxPdfStructure_Node *pNode, char *pBuffer, size_t nBufferSize)
PDFTOOLS_TOOLBOX_EXPORT BOOL PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_SetTagW(TPtxPdfStructure_Node *pNode, const WCHAR *szTag)
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_NodeList_GetCount(TPtxPdfStructure_NodeList *pNodeList)
Get the number of elements in the list.
PDFTOOLS_TOOLBOX_EXPORT size_t PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_GetStringAttributeA(TPtxPdfStructure_Node *pNode, const char *szKey, char *pBuffer, size_t nBufferSize)
Query a string attribute.
PDFTOOLS_TOOLBOX_EXPORT TPtxPdfStructure_NodeList *PDFTOOLS_TOOLBOX_CALL PtxPdfStructure_Node_GetChildren(TPtxPdfStructure_Node *pNode)
#define BOOL
Definition PdfTools_Toolbox_Types.h:23
Definition PdfTools_Toolbox_Types.h:2139