[]
        
(Showing Draft Content)

GrapeCity.Documents.Html.GcHtmlRenderer.RenderToPng

RenderToPng Method

RenderToPng(Stream, PngSettings)

Creates a PNG image from the source HTML and saves it to a specified stream.

Declaration
public bool RenderToPng(Stream outputStream, PngSettings settings = null)
Public Function RenderToPng(outputStream As Stream, Optional settings As PngSettings = Nothing) As Boolean
Parameters
Type Name Description
Stream outputStream

The destination stream.

PngSettings settings

The set of parameters for the output image.

Returns
Type Description
bool

True if PNG was successfully saved; otherwise, false.

RenderToPng(string, PngSettings)

Creates a PNG image file from the source HTML.

Declaration
public bool RenderToPng(string outputFilePath, PngSettings settings = null)
Public Function RenderToPng(outputFilePath As String, Optional settings As PngSettings = Nothing) As Boolean
Parameters
Type Name Description
string outputFilePath

The destination file path.

PngSettings settings

The set of parameters for the output image.

Returns
Type Description
bool

True if the browser process has exited; otherwise, false.