Table of Contents

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

document XlsxDocument

The workbook.

output Stream

The stream the PDF is written to.

options SpreadsheetPdfOptions

Sheets, a range, tagging, metadata and conformance; null for the defaults.

Exceptions

ArgumentNullException

document or output is null.

InvalidDocumentException

A part of the workbook the layout reads is malformed.

ResourceLimitExceededException

The workbook is more pages than the limits allow.