HtmlToImageConverterConvertHtmlStream Method

Converts the HTML string read from a stream to an image having the given format using a base URL to resolve external resources and returns the rendered image into a memory buffer

Definition

Namespace: Winnovative
Assembly: WnvHtmlToPdf_NetCore (in WnvHtmlToPdf_NetCore.dll) Version: 18.0.0
C#
public byte[] ConvertHtmlStream(
	Stream htmlStream,
	Encoding textEncoding,
	string baseUrl,
	ImageFormat format
)

Parameters

htmlStream  Stream
The stream containing the HTML string to convert to image
textEncoding  Encoding
The stream text encoding
baseUrl  String
The base URL used to determine the full URL of the external resources like images, CSS, JavaScript and Web Font files referenced by relative URLs in HTML
format  ImageFormat
The image format

Return Value

Byte
A memory buffer containing the the generated image

See Also