ExcelPdfDocumentExtensionsAddExcelAsync Method

Asynchronously renders an Excel workbook in the PDF document: the content starts at the position given by the element in the current page and continues on as many new pages as it needs, inside the margins of the PDF document. The content keeps the formatting, the images and the shapes of the worksheets, and each worksheet can start on a new page. The elements added after this call go to the last page of the content, below LastPageRectangle

Definition

Namespace: EvoPdf.Next
Assembly: EvoPdf.Next.ExcelToPdf (in EvoPdf.Next.ExcelToPdf.dll) Version: 15.0.0
C#
public static Task<PdfContentRenderInfo> AddExcelAsync(
	this PdfDocument pdfDocument,
	PdfExcelElement excelElement,
	CancellationToken ct = default
)

Parameters

pdfDocument  PdfDocument
The PDF document being created
excelElement  PdfExcelElement
The Excel workbook to render
ct  CancellationToken  (Optional)
A cancellation token that can be used to cancel the asynchronous operation

Return Value

TaskPdfContentRenderInfo
A PdfContentRenderInfo object describing the pages and the areas where the content was rendered

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type PdfDocument. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also