• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class WorkbookPdfExporter

Extension methods that export a Workbook to PDF.

Inheritance
object
WorkbookPdfExporter
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: DRIT.Spreadsheet.Export.Pdf
Assembly: DRIT.Spreadsheet.dll
Syntax
public static class WorkbookPdfExporter

Methods

BuildPdfDocument(Workbook, WorkbookPdfSaveOptions)

Builds and returns a Document from the workbook. The caller is responsible for disposing the returned document.

Declaration
public static Document BuildPdfDocument(this Workbook workbook, WorkbookPdfSaveOptions options = null)
Parameters
Type Name Description
Workbook workbook

The workbook to export.

WorkbookPdfSaveOptions options

Export options; a default instance is used when null.

Returns
Type Description
Document

SaveAsEncryptedPdf(Workbook, Stream, PasswordEncryption, WorkbookPdfSaveOptions)

Writes an encrypted PDF representation of the workbook to stream.

Declaration
public static void SaveAsEncryptedPdf(this Workbook workbook, Stream stream, PasswordEncryption encryption, WorkbookPdfSaveOptions options = null)
Parameters
Type Name Description
Workbook workbook

The workbook to export.

Stream stream

A writable stream that receives the PDF bytes.

PasswordEncryption encryption

Password encryption settings applied to the generated PDF.

WorkbookPdfSaveOptions options

Export options; a default instance is used when null.

SaveAsEncryptedPdf(Workbook, string, PasswordEncryption, WorkbookPdfSaveOptions)

Exports the workbook to an encrypted PDF file.

Declaration
public static void SaveAsEncryptedPdf(this Workbook workbook, string filePath, PasswordEncryption encryption, WorkbookPdfSaveOptions options = null)
Parameters
Type Name Description
Workbook workbook

The workbook to export.

string filePath

Destination file path. The file is created or overwritten.

PasswordEncryption encryption

Password encryption settings applied to the generated PDF.

WorkbookPdfSaveOptions options

Export options; a default instance is used when null.

SaveAsPdf(Workbook, Stream, WorkbookPdfSaveOptions)

Writes a PDF representation of the workbook to stream.

Declaration
public static void SaveAsPdf(this Workbook workbook, Stream stream, WorkbookPdfSaveOptions options = null)
Parameters
Type Name Description
Workbook workbook

The workbook to export.

Stream stream

A writable stream that receives the PDF bytes.

WorkbookPdfSaveOptions options

Export options; a default instance is used when null.

SaveAsPdf(Workbook, Stream, CancellationToken)

Writes a PDF representation of the workbook to stream, stopping immediately if cancellationToken is cancelled.

Declaration
public static void SaveAsPdf(this Workbook workbook, Stream stream, CancellationToken cancellationToken)
Parameters
Type Name Description
Workbook workbook
Stream stream
CancellationToken cancellationToken

SaveAsPdf(Workbook, string, WorkbookPdfSaveOptions)

Saves the workbook as a PDF file at filePath.

Declaration
public static void SaveAsPdf(this Workbook workbook, string filePath, WorkbookPdfSaveOptions options = null)
Parameters
Type Name Description
Workbook workbook

The workbook to export.

string filePath

Destination file path. The file is created or overwritten.

WorkbookPdfSaveOptions options

Export options; a default instance is used when null.

SaveAsPdf(Workbook, string, CancellationToken)

Saves the workbook as a PDF file at filePath, stopping immediately if cancellationToken is cancelled.

Declaration
public static void SaveAsPdf(this Workbook workbook, string filePath, CancellationToken cancellationToken)
Parameters
Type Name Description
Workbook workbook
string filePath
CancellationToken cancellationToken

SaveAsSignedPdf(Workbook, Stream, Signer, WorkbookPdfSaveOptions, string)

Writes a digitally signed PDF representation of the workbook to stream.

Declaration
public static void SaveAsSignedPdf(this Workbook workbook, Stream stream, Signer signer, WorkbookPdfSaveOptions options = null, string signatureFieldName = "Signature1")
Parameters
Type Name Description
Workbook workbook

The workbook to export.

Stream stream

A writable stream that receives the PDF bytes.

Signer signer

Signer used to produce the detached CMS signature.

WorkbookPdfSaveOptions options

Export options; a default instance is used when null.

string signatureFieldName

Optional signature field name. Defaults to Signature1.

SaveAsSignedPdf(Workbook, string, Signer, WorkbookPdfSaveOptions, string)

Exports the workbook to a digitally signed PDF file.

Declaration
public static void SaveAsSignedPdf(this Workbook workbook, string filePath, Signer signer, WorkbookPdfSaveOptions options = null, string signatureFieldName = "Signature1")
Parameters
Type Name Description
Workbook workbook

The workbook to export.

string filePath

Destination file path. The file is created or overwritten.

Signer signer

Signer used to produce the detached CMS signature.

WorkbookPdfSaveOptions options

Export options; a default instance is used when null.

string signatureFieldName

Optional signature field name. Defaults to Signature1.

Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX