 |
PdfCanvasAddAsync(PdfPageElement, CancellationToken) Method |
Adds a pdf page element to the canvas without waiting for it to be rendered, stopping when
the specified token is cancelled.
Namespace: SelectPdf.UniversalAssembly: SelectPdf.HtmlToPdf.Universal (in SelectPdf.HtmlToPdf.Universal.dll) Version: 26.4
Syntaxpublic Task<PdfRenderingResult> AddAsync(
PdfPageElement element,
CancellationToken cancellationToken
)
Public Function AddAsync (
element As PdfPageElement,
cancellationToken As CancellationToken
) As Task(Of PdfRenderingResult)
Parameters
- element PdfPageElement
- The page element to be rendered.
- cancellationToken CancellationToken
- A token that stops the addition when it is cancelled.
Return Value
TaskPdfRenderingResultA task that completes with the result of rendering the element.
Remarks
The element is rendered and placed as described for
AddAsync(PdfPageElement).
Cancelling the token stops an element that has not been placed yet - its background render
is stopped in the engine - and its task then ends cancelled, leaving the canvas as it was.
An element whose placement has already started is placed.
See Also