Edit this page

Settings

PdfFormatProvider allows for export of PDF documents and respectively export of RadRichTextBox to PDF. Additionally, the export settings provide modification options. The current article outlines the available settings.

Export Settings

PdfFormatProvider exposes ExportSettings, which allow you to control image quality, encryption, compliance level and other PDF format related properties.

  • CommentsExportMode: A property of type PdfCommentsExportMode that gets or sets how the comments should be exported.
    • None: The comments will not be exported.
    • NativePdfAnnotations: The comments will be exported as PDF annotation.
  • ContentsCompressionMode: A property of type PdfContentsCompressionMode that gets or sets a value indicating the compression mode used when compressing page contents. This property is an enumeration and it allows the following values:
    • None: No compression.
    • Deflate: The deflate algorithm will be applied to compress the text content of the document.
    • Automatic: The best algorithm will be automatically decided upon for you.
  • ContentsDeflaterCompressionLevel: A property of type integer between -1 and 9 that gets or sets a value indicating the compression level to be used when deflating the content of the document.
    • -1: Default Compression.
    • 0: No Compression.
    • 9: Best Compression.
  • DocumentInfo: A property of type PdfDocumentInfo. You can use this class to retrieve or change the document information. The document information which you can get or change is: Author, Creator, IncludeCreationDate, Keywords, Producer, Subject, Title.
  • DrawPageBodyBackground: A property of type bool that gets or sets a value indicating whether the exporter will draw a rectangle below the page body contents.
  • FloatingUIContainersExportMode: A property of type PdfInlineUIContainersExportMode that get or sets the current mode when exporting floating UI containers.
    • None: When set, the floating UI containers will not be exported.
    • Image: Default mode. All the FloatingUIContainers in the document are added as images in the PDF document.
  • ImagesCompressionMode: A property of type PdfImagesCompressionMode that gets or sets a value indicating the compression mode used when compressing images.
    • None: No compression.
    • Deflate: The deflate algorithm will be applied to compress the images.
    • Jpeg: The jpeg algorithm will be applied to compress the images.
    • Automatic: The best algorithm will be automatically decided upon for you.
  • ImagesDeflaterCompressionLevel: A property of type integer. Same as ContentsDeflaterCompressionLevel, but applied to the images in the document. This property is respected when an image is compressed with Deflate mode.
  • InlineUIContainersExportMode: A property of type PdfInlineUIContainersExportMode that get or sets the mode used when exporting inline UI containers.
    • None: The inline UI containers will not be exported.
    • Image: Default mode. All the InlineUIContainers are added as images to the PDF document.

Example 1: Setting the ExportSettings of the PdfFormatProvider

PdfExportSettings pdfExportSettings = new PdfExportSettings();
pdfExportSettings.ContentsDeflaterCompressionLevel = 9;
pdfExportSettings.DrawPageBodyBackground = false;

PdfFormatProvider pdfFormatProvider = new PdfFormatProvider();
pdfFormatProvider.ExportSettings = pdfExportSettings;

PDF import is currently not supported, so there are no import settings.

See Also