Gets binary format of an image generated from the specified HTML string in the
the specified ImageFormat format using a base URL to resolve the external resources. 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: EvoPdfAssembly: evohtmltopdf (in evohtmltopdf.dll) Version: 4.12.0.0
Syntax
| C# |
|---|
public byte[] GetImageBytesFromHtmlString( string htmlString, ImageFormat format, string urlBase ) |
| Visual Basic |
|---|
Public Function GetImageBytesFromHtmlString ( htmlString As String, format As ImageFormat, urlBase As String ) As Byte() |
| Visual C++ |
|---|
public: array<unsigned char>^ GetImageBytesFromHtmlString( String^ htmlString, ImageFormat^ format, String^ urlBase ) |
Parameters
- htmlString
- Type: System..::..String
The HTML string to be converted to image
- format
- Type: System.Drawing.Imaging..::..ImageFormat
The image format
- urlBase
- Type: System..::..String
The URL base of the page
Return Value
Type: array<Byte>[]()[][]The binary representation of the image as byte[] object