Table of Contents

Method ToImages

Namespace
DocWright.Spreadsheet.Rendering
Assembly
DocWright.Spreadsheet.Rendering.dll

ToImages(XlsxDocument, SpreadsheetImageOptions?)

Draws a workbook's pages as images: the pages ToPdf(XlsxDocument, Stream, SpreadsheetPdfOptions?) writes, or with SinglePage in Layout one image for each sheet, as large as its cells.

public IReadOnlyList<byte[]> ToImages(XlsxDocument document, SpreadsheetImageOptions? options = null)

Parameters

document XlsxDocument

The workbook.

options SpreadsheetImageOptions

What is laid out and the images' format and size; null for PNG pages.

Returns

IReadOnlyList<byte[]>

The encoded images, one for each page drawn, in order.

Exceptions

ArgumentNullException

document is null.

InvalidDocumentException

A part of the workbook the layout reads is malformed.

ResourceLimitExceededException

The workbook is more pages, or an image more pixels, than the limits allow.