ExcelToPdfConverter Class

Provides functionality for converting Excel (.xlsx) documents to PDF format with support for customization options such as metadata, security and viewer preferences

Definition

Namespace: Winnovative.Pdf.Next
Assembly: Winnovative.Pdf.Next.ExcelToPdf (in Winnovative.Pdf.Next.ExcelToPdf.dll) Version: 20.0.0
C#
public class ExcelToPdfConverter
Inheritance
Object    ExcelToPdfConverter

Constructors

ExcelToPdfConverter Initializes a new instance of the ExcelToPdfConverter class with default options

Properties

DigitalSignature The digital signature to apply to the generated the PDF document
ExcelLoaderFilePath Sets the full path of the Excel loader file
KeepColumnWidths When set to true, keeps the original Excel column widths percentage in the generated PDF document. The cell content can be clipped if the column is too narrow. When set to false, the column widths are adjusted to fit the PDF page width and the Excel drawings like images might not align with the cells. The default value is true
KeepRowHeights When set to true, keeps the original Excel row heights in the generated PDF document. When set to false, the row heights are adjusted to fit the cell content height and the Excel drawings like images might not align with the cells. The default value is true
PdfDocumentInfo Gets a reference to the object controlling the generated PDF document information like the document title, author, subject or creation date
PdfDocumentOptions Gets a reference to the object controlling the conversion process and the generated PDF document properties like PDF document margins, PDF page size and orientation, PDF document header and footer
PdfSecurityOptions Gets a reference to the object controlling the generated PDF document security settings like user and owner password, restrict printing or editing of the generated PDF document
PdfViewerPreferences Gets a reference to the object controlling how the generated PDF is displayed by a PDF viewer

Methods

ConvertToPdf(Byte) Converts an Excel document to a PDF byte array. The input must be a valid .xlsx file provided as a byte array. The resulting PDF content is returned as a byte array, which can be saved, streamed or transmitted as needed
ConvertToPdf(String) Converts an Excel file from the specified file path to a PDF byte array. The input file must be a valid .xlsx format document. The resulting PDF content is returned as a byte array, which can be saved to disk, sent over a network, or written directly to a response stream
ConvertToPdfAsync(Byte, CancellationToken) Asynchronously converts an Excel document to a PDF byte array. The input must be a valid .xlsx file provided as a byte array. The resulting PDF content is returned as a byte array, which can be saved, streamed or transmitted as needed
ConvertToPdfAsync(String, CancellationToken) Asynchronously converts an Excel file from the specified file path to a PDF byte array. The input file must be a valid .xlsx format document. The resulting PDF content is returned as a byte array, which can be saved to disk, sent over a network, or written directly to a response stream
ConvertToPdfFile(Byte, String) Converts an Excel document from a byte array to PDF and saves the result to a specified file path
ConvertToPdfFile(String, String) Converts an Excel document from a file path to PDF and saves the result to a specified file path
ConvertToPdfFileAsync(Byte, String, CancellationToken) Asynchronously converts an Excel document from a byte array to PDF and saves the result to a specified file path
ConvertToPdfFileAsync(String, String, CancellationToken) Asynchronously converts an Excel document from a file path to PDF and saves the result to a specified file path
Equals
(Inherited from Object)
Finalize
(Inherited from Object)
GetHashCode
(Inherited from Object)
GetType
(Inherited from Object)
MemberwiseClone
(Inherited from Object)
ToString
(Inherited from Object)

See Also