Class PdfOptions
- Namespace
- LibreOfficeKit
- Assembly
- LibreOfficeKit.dll
PDF export options that map to LibreOffice FilterData parameters. Use this class to configure the PDF output quality, compliance, security, and layout.
public class PdfOptions
- Inheritance
-
PdfOptions
- Inherited Members
Properties
Archive
Gets PDF/A-2b archival settings.
public static PdfOptions Archive { get; }
Property Value
Compression
Gets or sets the image compression settings for PDF export.
public PdfCompressionOptions? Compression { get; set; }
Property Value
EncryptionPassword
Gets or sets the encryption password for the PDF document.
public string? EncryptionPassword { get; set; }
Property Value
ExportBookmarks
Gets or sets whether to export bookmarks (outlines) to PDF.
public bool ExportBookmarks { get; set; }
Property Value
ExportFormFields
Gets or sets whether to export form fields as interactive widgets.
public bool ExportFormFields { get; set; }
Property Value
ExportNotes
Gets or sets whether to export document notes/comments.
public bool ExportNotes { get; set; }
Property Value
HighQuality
Gets high quality print/archival settings.
public static PdfOptions HighQuality { get; }
Property Value
InitialView
Gets or sets the initial viewer panel state.
public InitialView InitialView { get; set; }
Property Value
MaxImageResolutionDpi
Gets or sets the maximum image resolution in DPI.
public int MaxImageResolutionDpi { get; set; }
Property Value
Remarks
Default is 300 DPI, which is suitable for print quality. For screen-optimized PDFs, a value of 150 DPI or lower may be sufficient and can reduce file size.
PageRange
Gets or sets the page range to export (null for all pages).
public string? PageRange { get; set; }
Property Value
PdfACompliance
Gets or sets the PDF/A compliance level.
public PdfACompliance PdfACompliance { get; set; }
Property Value
PdfVersion
Gets or sets the PDF version/compliance level.
public PdfVersion? PdfVersion { get; set; }
Property Value
Remarks
Defaults to null, which means the PDF version will be determined based on other settings (e.g. PDF/A compliance). If set, this
overrides the PDF version implied by PDF/A compliance. For example, setting PdfVersion to PdfA2B will
ensure the output is PDF/A-2b compliant, while setting it to Pdf1_7 will produce a standard PDF 1.7 document without PDF/A compliance.
Gets print-optimized balance of quality and size.
public static PdfOptions Print { get; }
Property Value
Quality
Gets or sets the JPEG compression quality (1 - 100).
public int Quality { get; set; }
Property Value
Remarks
Default is 90, which provides a good balance of quality and file size. Values above 95 may not yield noticeable improvements and can increase file size significantly.
ReduceImageResolution
Gets or sets whether to reduce image resolution to MaxImageResolutionDpi.
public bool ReduceImageResolution { get; set; }
Property Value
Screen
Gets screen-optimized settings.
public static PdfOptions Screen { get; }
Property Value
Security
Gets or sets the security and permission settings for PDF export.
public PdfSecurityOptions? Security { get; set; }
Property Value
SinglePageSheets
Gets or sets whether to fit spreadsheet sheets on a single PDF page.
public bool SinglePageSheets { get; set; }
Property Value
Remarks
Only applicable when exporting Calc spreadsheets. If true, each sheet will be scaled to fit on a single PDF page, which can improve readability but may reduce quality if the sheet is large. If false, sheets will be exported at their actual size, which may span multiple PDF pages.
UseLosslessCompression
Gets or sets whether to use lossless (PNG) compression for images.
public bool UseLosslessCompression { get; set; }
Property Value
UseTaggedPdf
Gets or sets whether to create a tagged PDF for accessibility.
public bool UseTaggedPdf { get; set; }
Property Value
Watermark
Gets or sets watermark text for all pages.
public string? Watermark { get; set; }