ImgConverterGetImageBytesFromHtmlStringAsync(String, ImageFormat, CancellationToken) Method |
Converts the specified HTML string into an image asynchronously and returns the image as an array of bytes in the specified format.
Namespace: ExpertPdf.HtmlToPdfAssembly: ephtmltopdf (in ephtmltopdf.dll) Version: 22.0.0
Syntaxpublic Task<byte[]> GetImageBytesFromHtmlStringAsync(
string htmlString,
ImageFormat format,
CancellationToken cancellationToken = default
)
Public Function GetImageBytesFromHtmlStringAsync (
htmlString As String,
format As ImageFormat,
Optional cancellationToken As CancellationToken = Nothing
) As Task(Of Byte())
Parameters
- htmlString String
- The HTML string to be converted.
- format ImageFormat
- The image format.
- cancellationToken CancellationToken (Optional)
- A token that cancels the wait for the conversion.
Return Value
TaskByteA task whose result is the image bytes.
Remarks
See Also