My Account |  Site Map | Contact Us  

Pdf API for .NET: HTML (Url) to PDF Converter Demo

All Products
EO.Web Controls
EO.Pdf for .NET
HTML to PDF (Url)
HTML to PDF (HTML File)
HTML to PDF (HTML Markup)
ASPX To PDF
MVC To PDF
PDF Creator API
PDF Reader API
PDF Page Extraction API
PDF Splitting API
PDF Merging API
PDF Encryption API
API to Fill Form Fields
EO.Wpf for .NET
EO.WebBrowser for .NET

This sample uses EO.Pdf for .NET to convert any Url to PDF file.

Use it in your Application

Sample code to convert Url to PDF (many advanced features not shown here):

C# VB.NET  
//Code to convert an Url or HTML file to PDF. The following code writes output to a file. You can 
//also write output to a Stream, a PdfPage, or a PdfDocument object
HtmlToPdf.ConvertUrl(urlOrHtmlFile, outputFileName);

In addition to convert it to a file, it can also convert it to any .NET Stream object. For example, you can convert it to a MemoryStream object, then retrieve the raw bytes of the PDF file from the MemoryStream and attach it to an email, all without creating any physical file at all.

There are many conversion options available. Detailed documentation and sample code about this feature can be found in the download package.

Try it Online

Enter any Url you wish to convert, then click "Convert" button to convert it into a PDF file. You will be able to download the converted PDF file afterwards. Note the Url must be accessible from our server.

Please enter the text in the image:

More samples and demos with source code can be found in the download package.

Core Features

  • Convert any Url or HTML file to PDF. Rendering any Url or HTML page the same as your browser does, but output as PDF;
  • Zero External Dependency. Does not depend on any Web browser on your system. Will always work regardless you install, uninstall or update your browsers;
  • Built-in Javascript Engine. All Javascript code runs exactly the same way as they would in a browser. You can also turn Javascript off;
  • Automatic and Manual Paging. The converter can automatically page the contents into multiple pages completely based on page contents or "hard page break" styles such as "page-break-before" and "page-break-after" in your HTML code;
  • Scale to Fit. Automatically scaling the HTML page to fit in PDF paper size, or use a fixed scaling factor (or not scaling at all);
  • Selectable Text and clickable Links. The generated PDF file is not a "screenshot" type image. All texts in your HTML file are rendered as selectable text in PDF. All links in your HTML file are preserved;
  • HTTP Post and Authentication. Need to post a page or authenticate with the server? Just provide the data you wish to post or user name and password needed to login the server;
  • Multiple output options. Output to a file? Output to a stream? Output to Web client? Output as a download file? Choose one that fits your need.
  • And much more. Try it out for free to see it in action!

Additional Resources

  • Product Documentation

    All features are explained in great details in the product documentation. It also contains complete reference information for each type, property or method;

  • Samples

    The download package contains a wide variety of samples with full C# and Visual Basic.NET source code that demonstrate how to use different feature of the EO.Pdf library.

  • Technical Support

    Still have questions? Post in our support forum or contact us and we will answer them quickly. Our turn around time is among the best in the industry.