Comprehensive Guide for Developers: Features, Integration, and API Reference
XML Extractor API. More...
Go to the source code of this file.
Macros | |
| #define | PDF_XMLEXTRACTOR_API PDFSDK_IMPORT_ |
Typedefs | |
| typedef PDErrCode(PDFSDK_CALLCONV * | PDTXmlWriteProc) (const char *xml, size_t numBytes, void *clientData) |
Functions | |
| PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV | PDTTextBlockSerializeToXML (PDTLayout layout, PDTTextBlock block, PDTXmlWriteProc proc, void *clientData) |
| PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV | PDTTextBlockDeserializeFromXML (PDDoc doc, PDTLayout layout, PDTTextBlock block, const char *pXml, size_t numBytes) |
| PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV | PDTLayoutSerializeToXML (PDTLayout layout, PDTXmlWriteProc proc, void *clientData) |
| PDFSDK_IMPORT_ PDErrCode PDFSDK_CALLCONV | PDTLayoutDeserializeFromXML (PDDoc doc, PDTLayout layout, const char *pXml, size_t numBytes) |
XML Extractor API.
Serializes a text block (paragraphs, spans, font and paragraph attributes) to a self-contained XML representation and applies such XML back to a text block, fitting the new text to the block by shrinking font size and line spacing when required.
Text lives in <tbspan> elements (one per span); all styling is a styles JSON attribute on the
(a para object plus a spans map of attribute->span-indices), so styles reattach by index.
Single text block – a <body> root:
Whole page – a <page> root with one <block> per text block: