Method ToPdf
- Namespace
- DocWright.Spreadsheet.Rendering
- Assembly
- DocWright.Spreadsheet.Rendering.dll
ToPdf(XlsxDocument, Stream, SpreadsheetPdfOptions?)
Writes a workbook as PDF, page for page what Excel's own export writes: every visible worksheet in order, each by its print area and page setup.
public void ToPdf(XlsxDocument document, Stream output, SpreadsheetPdfOptions? options = null)
Parameters
documentXlsxDocumentThe workbook.
outputStreamThe stream the PDF is written to.
optionsSpreadsheetPdfOptionsSheets, a range, tagging, metadata and conformance; null for the defaults.
Exceptions
- ArgumentNullException
documentoroutputis null.- InvalidDocumentException
A part of the workbook the layout reads is malformed.
- ResourceLimitExceededException
The workbook is more pages than the limits allow.