![]() |
PDFix SDK
7.2.0
|
PdfDocTemplate class. More...
#include <pdfix.h>
Public Member Functions | |
virtual bool | Update (PdfCancelProc cancel_proc, void *cancel_data)=0 |
Update the document template after adding pages. More... | |
virtual bool | LoadFromStream (PsStream *stream, PsDataFormat format)=0 |
virtual bool | SaveToStream (PsStream *stream, PsDataFormat format, PdfSaveFlags flags)=0 |
virtual bool | SetDefaults ()=0 |
Resets document template to default values. | |
virtual float | GetProperty (const wchar_t *name) const =0 |
Gets the value of the property by name. More... | |
virtual bool | SetProperty (const wchar_t *name, float value)=0 |
Supply the name of the property and the value as a float, just as you would in a config file. More... | |
virtual int | GetRegex (const wchar_t *name, wchar_t *buffer, int len) const =0 |
Gets the pattern of the regex by name. More... | |
virtual bool | SetRegex (const wchar_t *name, const wchar_t *pattern)=0 |
Supply the name of the regex and the pattern as a wstring, just as you would in a config file. More... | |
virtual bool | AddPage (int page_num, PdfCancelProc cancel_proc, void *cancel_data)=0 |
virtual PdfPageTemplate * | GetPageTemplate (int page_num)=0 |
Get the object reffering the document template related to the page. More... | |
PdfDocTemplate class.
PdfDocTemplate is used to customize a logical content detection algorithm based on document set. After pre-processing reference pages and collecting the information about page content the PdfDocTemplate updates the provide information about position of headers, footers, heading structure. Data from the PdfDocTemplate can be saved to the template configuration file for using with other files with the same document template
|
pure virtual |
Preprocess the page before the document preflight. Methods parses the page and collects information for document preflight.
page_num | The page number to preprocess. |
|
pure virtual |
Get the object reffering the document template related to the page.
page_num | The page number for which the information is to be retrieved. |
|
pure virtual |
Gets the value of the property by name.
name | Name of the propety. |
|
pure virtual |
Gets the pattern of the regex by name.
name | Name of the regex. |
buffer | (filled by method) If the buffer is null function returns required length of string |
len | Length of a buffer to be filled in. |
|
pure virtual |
Imports a document template configuration from a stream. Only JSON and XML formats are supported.
stream | Source stream of the document template. |
format | Format of the source stream. Only JSON format is supported. |
|
pure virtual |
Exports document template configuration into a stream. Only JSON and XML formats are supported. Supported flags are kSaveUncompressed and kSaveIncludeComments
stream | Source stream of the document template. |
format | Format of the source stream. Only JSON format is supported. |
flags | A PdfSaveFlags value |
|
pure virtual |
Supply the name of the property and the value as a float, just as you would in a config file.
name | Name of the propety. |
value | New value of the property. |
|
pure virtual |
Supply the name of the regex and the pattern as a wstring, just as you would in a config file.
name | Name of the regex. |
pattern | New pattern of the regex. |
|
pure virtual |
Update the document template after adding pages.
cancel_proc | Callback to check for canceling operations. |
cancel_data | Pointer to client data for the cancel procedure. |