windowsforms-7315-controls-and-libraries-printing-exporting-concepts-exporting-export-to-pdf.md
This topic details the specifics of exporting a document to PDF (Portable Document Format).
Tip
See the following code examples illustrating how to export a report to PDF in code:
This topic consists of the following sections.
The PDF export engine produces PDF documents of the following versions depending on specified export options:
PDF generation does not require installing third-party components on an end-user’s machine.
The document pages’ background is filled with the color specified by the XtraReport.PageColor property. If you want to add a background image to the PDF file, set this property to Transparent.
The PDF options are provided by the PdfExportOptions class. These options can be accessed via a report’s ExportOptions.Pdf property and are detailed in the following sections.
The following PDF/A specifications are supported.
To make a document compatible with the PDF/A specification, use the following options.
If the PdfExportOptions.PdfACompatibility property is set to PdfACompatibility.None (the default value), the resulting document will conform to the ISO 32000-1:2005 standard without any restrictions.
For a code sample, refer to the following example online: How to export a report to ZUGFeRD.
For the current versions of the library, consider the following restrictions associated with PDF/A compatibility.
To check the validity of PDF export options, use the PdfExportOptions.Validate method that returns a list of any detected inconsistencies.
Use the PdfExportOptions.PasswordSecurityOptions property to protect the resulting PDF file from being read, copied, printed and/or edited by specifying passwords for these actions.
After specifying PdfExportOptions.PasswordSecurityOptions, use the PdfPasswordSecurityOptions.EncryptionLevel property to select the algorithm for encrypting content of a PDF file.
Use the PdfExportOptions.SignatureOptions to apply an X.509 certificate to the resulting PDF file and digitally sign the document.
Use the following options to vary the quality of PDF-embedded images and in this way, control the resultant file size.
To reduce the size of large documents (e.g., before sending them via e-mail), you can use the following option.
As for the embedded fonts and PDF page content, they are always compressed in the resulting PDF file.
At present, the following limitations apply to PDF export: