Image.ToDataUrlAsync Method

Generates a data URL for this image asynchronously.

public Task<string> ToDataUrlAsync(
	CancellationToken cancellationToken = default
)
Namespace
PdfToSvg
Package
PdfToSvg.NET (since v0.8.0)

Parameters

cancellationToken  CancellationToken  (Optional)
Cancellation token that can be used to cancel the operation.

Return Value

Task<String>
Data URL for this image.

Exceptions

ExceptionCondition
PermissionExceptionContent extraction from this document is forbidden by the document author. Not thrown if the document is opened with the owner password (see Password).
OperationCanceledExceptionThe operation was cancelled because the cancellation token was triggered.

See Also

Image Class
PdfToSvg Namespace