Gets binary format of an image generated from the specified HTML stream in the
the specified ImageFormat format using a base URL to resolve the external resources. 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.
The bytes can be further written in any stream like a disk file or a web response.
Namespace: EvoPdfAssembly: evohtmltopdf (in evohtmltopdf.dll) Version: 4.12.0.0
Syntax
| C# |
|---|
public byte[] GetImageBytesFromHtmlStream( Stream htmlStream, Encoding streamEncoding, ImageFormat format, string urlBase ) |
| Visual Basic |
|---|
Public Function GetImageBytesFromHtmlStream ( htmlStream As Stream, streamEncoding As Encoding, format As ImageFormat, urlBase As String ) As Byte() |
| Visual C++ |
|---|
public: array<unsigned char>^ GetImageBytesFromHtmlStream( Stream^ htmlStream, Encoding^ streamEncoding, ImageFormat^ format, String^ urlBase ) |
Parameters
- htmlStream
- Type: System.IO..::..Stream
The HTML stream
- streamEncoding
- Type: System.Text..::..Encoding
The encoding of the HTML stream
- 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