DynaPDF Manual - Page 782

Previous Page 781   Index   Next Page 783

Function Reference
Page 782 of 839
The function changes the output file version. The default output version is PDF 1.4. If a PDF file
with a higher version as curently set will be imported, then the file version is adjusted to the version
of the imported file.
Note that not all available versions can be created by DynaPDF. However, DynaPDF is able to
identify all versions listed above when importing a PDF file. A known version will not be stripped
out when saving a PDF file with DynaPDF.
To improve processing speed, the output version is not checked at runtime and no features are
disabled which are maybe not supported by the current PDF version.
However, if a PDF file must be compatible to a specific Acrobat version, change the version and
open the file in Adobe's Acrobat. If error messages or other warnings appear, the file contains
unsupported features. For example, Unicode output is supported since PDF 1.3. If the output
version will be changed to PDF 1.2, you will get an error message in Adobe's Acrobat if the file
contains CID fonts (Unicode fonts). There is no other known feature that causes errors when
opening a PDF file with Acrobat or Reader.
To create PDF/X or PDF/A compatible files we recommended to use a preflight tool to check
whether unsupported features were used or whether additional settings are required to meet the
requirements of the standard. The PDF version should be set at the end of processing, directly
before CloseFile() or CloseFileEx() is called. See also PDF/X and PDF/X Compatibility.
ZUGFeRD, ZUGFeRD 2.0, Factur-X / ZUGFeRD 2.1/2.2
ZUGFeRD 2.0 and Factur-X are almost identically defined. Both standards support the very same
profiles. To create a ZUGFeRD 2.0 invoice with the profile Basic WL, for example, set the PDF
version as follows:
pdfSetPDFVersion(pdf, TPDFVersion(pvFacturX_Basic_WL | pvZUGFeRD2_Flag));
The PDF version is set to PDF/A 3b in the above example. If you want to create the very same
invoice but as PDF/A 3u file, for example, then set also the whished output PDF version:
pdfSetPDFVersion(pdf, TPDFVersion(pvPDFA_3u | pvFacturX_Basic_WL | pvZUGFeRD2_Flag));
Note that this function just sets the PDF version. It does not check whether the resulting file is
compatible to the whished output version. Use CheckConformance() to convert arbitrary PDF files
to PDF/A, ZUGFeRD, or Factur-X files.
ZUGFeRD 2.1 or higher
ZUGFeRD is an ever growing standard that is updated every few months. Important to know is that
beginning with ZUGFeRD 2.1 Factur-X and ZUGFeRD are identically defined in PDF. Therefore, the
Factur-X constants can be used to create Factur-X and ZUGFeRD 2.1 or higher files. The PDF
container cannot distiguish between these formats.
ZUGFeRD and Factur-X invoices require an embedded XML invoice. The XML file can be attached
with AttachFile() or AttachFileEx().
 

Previous topic: SetPDFVersion

Next topic: SetPrintSettings, SetProgressProc