Table of Contents
HtmlToPdf.ConvertUrl Method (String, Stream, HtmlToPdfOptions)

Convert a Web page into PDF and write the output to a Stream.

Syntax
 public static HtmlToPdfResult ConvertUrl(
   string url,
   Stream stream,
   HtmlToPdfOptions options
);

Parameters

url
The Url of the page.
stream
The output stream.
options
The conversion options that would override HtmlToPdf.Options if specified.

Return Value

Returns a HtmlToPdfResult object that contains additional information about the conversion.

Remarks

Use this version to save the PDF directly to a stream without creating a file, which is especially useful in a Web application. For example, the following code saves the output directly to the OutputStream of the current HttpResponse object.

//Convert Url to PDF and send the result directly to the client
HtmlToPdf.ConvertUrl("http://www.google.com", Response.OutputStream);
See Also