DynaPDF Manual - Page 492

Previous Page 491   Index   Next Page 493

Function Reference
Page 492 of 787
scaling of PDF pages (scaling is only possible with templates). So, if you want to scale the pages to
another page format then the conversion of pages to templates is required.
However, in most cases scaling is not required. The conversion of pages to templates should be
avoided in this case by setting the flag ifImportAsPage:
pdfSetImportFlags(pdf, ifImportAll | ifImportAsPage);
The advantage is that non-converted pages are a little bit smaller and a PDF file can be imported
and written to disk arbitrary often without increasing the file size or the nesting depth of templates.
Especially the nesting depth of templates can be an important aspect if a PDF file must edited
multiple times. Note that each time a PDF file is imported, while pages are converted to templates,
the nesting depth of templates becomes incremented. So, if you would import and save a PDF file in
a loop, while each time pages are converted to templates, the resulting PDF file becomes larger and
larger, and the nesting depth of templates becomes higher and higher. A nesting depth of more than
8 can already cause printing problems. Viewer applications support usually much higher nesting
depths but the memory usage becomes then very large and the rendering speed is decreased.
Return values:
If the function succeeds the return value is the last page number that was touched. For example, if
the document in memory contains already 20 pages, and if we import a PDF file with 23 pages, and
if the destination page is 21 the return value should be 43 because this is the last page that was
invoked during import.
If the function fails the return value is a negative error code.
InitBarcode2
Syntax:
LBOOL pdfInitBarcode2(
struct TPDFBarcode2* Barcode) // Barcode structure
The function initializes the TPDFBarcode2 structure with default values. The member StructSize must
be set to sizeof(TPDFBarcode2) before the function can be called. The structure size is used to
identify different versions of the structure.
Please note that many members of the structure must be initialized with non-zero values.
Initializing the structure with zero is no meaningful initialization.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
 

Previous topic: ImportPDFFile

Next topic: InitColorManagement

Start Chat