Click or drag to resize
Pdf Library for .NET

ExcelToPdfOptions Class

Controls the Excel to PDF conversion process and the properties of the generated PDF document.
Inheritance Hierarchy
SystemObject
  SelectPdf.UniversalExcelToPdfOptions

Namespace: SelectPdf.Universal
Assembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.6
Syntax
public class ExcelToPdfOptions

The ExcelToPdfOptions type exposes the following members.

Constructors
 NameDescription
Public methodExcelToPdfOptions 
Top
Properties
 NameDescription
Public propertyAccessibilityStandard Gets or sets the universal accessibility standard the produced document declares. The default is None.
Public propertyAutoDetectComplexScript Gets or sets whether text in complex scripts (Arabic, Hebrew, Thai and the like) is detected and shaped accordingly. Default: false.
Public propertyColorSpace Gets or sets the color space of the generated pdf. Default: RGB.
Public propertyConvertBlankPages Gets or sets whether a page with no content inside a sheet's printed range is kept. Default: false.
Public propertyConvertBlankSheets Gets or sets whether a sheet with no content still produces a page. Default: false.
Public propertyDisplayFooter Gets or sets whether the custom footer set on Footer is displayed. Default: false.
Public propertyDisplayHeader Gets or sets whether the custom header set on Header is displayed. Default: false.
Public propertyExternalLinksEnabled Gets or sets whether the hyperlinks of the workbook that point to a web address are kept as clickable links in the generated pdf. Default: true.
Public propertyGenerateSinglePagePdf Gets or sets whether the whole workbook is rendered onto one tall pdf page. Default: false.
Public propertyGridLines Gets or sets whether the cell gridlines are drawn. Default: Automatic, as each sheet's print setting says.
Public propertyImagesMaxResolution Gets or sets the highest resolution, in pixels per inch, an image is kept at in the generated pdf document.
Public propertyInternalLinksEnabled Gets or sets whether the hyperlinks of the workbook that point inside it (to a cell, a sheet or a slide) are kept as clickable links in the generated pdf. Default: true.
Public propertyJpegCompressionEnabled Gets or sets whether the images of the generated pdf are re-encoded as JPEG at the quality given by JpegCompressionLevel. Default: true.
Public propertyJpegCompressionLevel Gets or sets the JPEG compression level, from 0 (best quality) to 100 (smallest file). Default: 10.
Public propertyLanguage Gets or sets the natural language of the text in a tagged PDF (see Tagged), as a BCP 47 language tag such as en-US. When not set, defaults to en-US.
Public propertyLayout Gets or sets how the content of each sheet is scaled onto its pages. Default: Automatic, the sheet's own print scaling.
Public propertyLFN Gets or sets the path of a log file the converter writes diagnostic messages to. Default: null (no log).
Public propertyMarginBottom Gets or sets the bottom margin of the generated pdf pages, in points. Default: 0.
Public propertyMarginLeft Gets or sets the left margin of the generated pdf pages, in points, applied around the rendered page. Default: 0.
Public propertyMarginRight Gets or sets the right margin of the generated pdf pages, in points. Default: 0.
Public propertyMarginTop Gets or sets the top margin of the generated pdf pages, in points. Default: 0.
Public propertyPageRanges Gets or sets the pages of the rendered document that go into the pdf, e.g. "1", "2-4", "1-3,5,7-" (1-based). Empty, the default, keeps every page.
Public propertyPageSetup Gets or sets where the pages take their size, orientation and margins from: each sheet's own page setup (the default) or the PdfPageSize, PdfPageOrientation and margins set on these options.
Public propertyPassword Gets or sets the password of an encrypted workbook. Default: null.
Public propertyPdfCompressionLevel Gets or sets the compression level of the content streams and fonts of the generated pdf. Default: Normal.
Public propertyPdfDocumentInformation Gets a reference to the object that sets the document information (title, author, subject, keywords, producer, creation date) of the generated pdf.
Public propertyPdfPageCustomSize Gets or sets the custom page size, in points, used when PdfPageSize is Custom.
Public propertyPdfPageOrientation Gets or sets the orientation of the generated pdf pages when PageSetup is Options. Default: Portrait.
Public propertyPdfPageSize Gets or sets the size of the generated pdf pages. Used when PageSetup is Options; with Document every page has the size of the workbook page it was rendered from. Default: A4.
Public propertyPdfStandard Gets or sets the PDF standard (PDF/A, PDF/X) the generated pdf conforms to. Default: Full (no standard).
Public propertyPreserveFormFields Gets or sets whether the sheets' form controls (check boxes, option buttons, combo boxes) become fillable pdf form fields instead of flat drawings. Default: false.
Public propertySecurityOptions Gets a reference to the object that sets the security options (passwords, permissions, encryption) of the generated pdf.
Public propertySheetBookmarks Gets or sets whether the pdf outline gets one entry per sheet, named after it. Default: true.
Public propertySheetHeadersAndFooters Gets or sets whether the sheets' own printed headers and footers (set in Excel's page setup) are drawn. They are independent of Header and Footer. Default: true.
Public propertyTagged Gets or sets a value indicating whether the produced document is a tagged (accessible) PDF carrying a logical-structure tree, suitable for PDF/UA. The default is false.
Public propertyTitle Gets or sets the document title recorded in the metadata of a tagged PDF (see Tagged). Accessible documents are required to declare a title. When not set, the title of PdfDocumentInformation is used.
Public propertyViewerPreferences Gets a reference to the object that sets the viewer preferences of the generated pdf.
Public propertyWorksheets Gets or sets the sheets that are converted, by name, comma separated (for example "Summary, Q1"). Empty, the default, converts every visible sheet in workbook order. Naming a sheet the workbook does not have fails the conversion.
Top
Remarks
The options shared with the html converter (page size and margins, header and footer display, links, compression, document information, security, viewer preferences, standards) have the same names, types and defaults as on HtmlToPdfOptions. The Excel-specific options are PageSetup, Password, Worksheets, Layout, GridLines, SheetBookmarks, SheetHeadersAndFooters, ConvertBlankSheets, ConvertBlankPages, PreserveFormFields and AutoDetectComplexScript.
See Also