Click or drag to resize

ImgConverterGetImageBytesFromHtmlString Method (String, ImageFormat, String)

Gets binary format of an image generated from the specified HTML string in the the specified System.Drawing.Imaging.ImageFormat format. The bytes can be further written in any stream like a disk file or a web response. The urlBase parameter allows the converter to determine the full URLs from relative URLs for images and CSS files appearing in the HTML code from htmlString parameter.

Namespace:  ExpertPdf.HtmlToPdf
Assembly:  ephtmltopdf (in ephtmltopdf.dll) Version: 17.0.0
Syntax
public byte[] GetImageBytesFromHtmlString(
	string htmlString,
	ImageFormat format,
	string urlBase
)

Parameters

htmlString
Type: SystemString
The HTML string to be converted to image
format
Type: System.Drawing.ImagingImageFormat
The image format
urlBase
Type: SystemString
The URL base of the page

Return Value

Type: Byte
The binary representation of the image as byte[] object
See Also