HTML to PDF - HTML to PDF Converter

Support

See below links to the developer's guides and API documentation. There are also some code samples for your C# or VB.NET applications.

 
  Download   Buy now   Live demo    About us  

Support questions

Send your support questions to office@html-to-pdf.net. Include your order number for priority support.

API documentation

You can find the API documentation here:

ExpertPDF HTML To PDF Developer's Guide
ExpertPDF HTML To PDF FAQs
ExpertPDF HTML To PDF Library API Documentation

ExpertPDF Pdf Creator Developer's Guide
ExpertPDF Pdf Creator API Documentation

ExpertPDF PdfToText Library Documentation
ExpertPDF PDF Merger Library Documentation
ExpertPDF PDF Splitter Library Documentation
ExpertPDF PDF Viewer Control Documentation

C# code sample

PdfConverter pdfConverter = new PdfConverter();

pdfConverter.PdfDocumentOptions.PdfPageSize = PdfPageSize.A4;
pdfConverter.PdfDocumentOptions.PdfCompressionLevel = PdfCompressionLevel.Normal;
pdfConverter.PdfDocumentOptions.ShowHeader = true;
pdfConverter.PdfDocumentOptions.ShowFooter = true;
pdfConverter.PdfDocumentOptions.LeftMargin = 5;
pdfConverter.PdfDocumentOptions.RightMargin = 5;
pdfConverter.PdfDocumentOptions.TopMargin = 5;
pdfConverter.PdfDocumentOptions.BottomMargin = 5;
pdfConverter.PdfDocumentOptions.GenerateSelectablePdf = true;

pdfConverter.PdfDocumentOptions.ShowHeader = false;
//pdfConverter.PdfHeaderOptions.HeaderText = "Sample header: " + TxtURL.Text;
//pdfConverter.PdfHeaderOptions.HeaderTextColor = Color.Blue;
//pdfConverter.PdfHeaderOptions.HeaderDescriptionText = string.Empty;
//pdfConverter.PdfHeaderOptions.DrawHeaderLine = false;

pdfConverter.PdfFooterOptions.FooterText = "Sample footer: " + TxtURL.Text + 
". You can change color, font and other options";
pdfConverter.PdfFooterOptions.FooterTextColor = Color.Blue;
pdfConverter.PdfFooterOptions.DrawFooterLine = false;
pdfConverter.PdfFooterOptions.PageNumberText = "Page";
pdfConverter.PdfFooterOptions.ShowPageNumber = true;

//pdfConverter.LicenseKey = "put your serial number here";
byte[] downloadBytes = pdfConverter.GetPdfFromUrlBytes(url);


System.Web.HttpResponse response = System.Web.HttpContext.Current.Response;
response.Clear();
response.AddHeader("Content-Type", "binary/octet-stream");
response.AddHeader("Content-Disposition",
    "attachment; filename=" + downloadName + "; size=" + downloadBytes.Length.ToString());
response.Flush();
response.BinaryWrite(downloadBytes);
response.Flush();
response.End();


VB.NET code sample

Dim pdfConverter As PdfConverter = New PdfConverter

pdfConverter.PdfDocumentOptions.PdfPageSize = PdfPageSize.A4
pdfConverter.PdfDocumentOptions.PdfCompressionLevel = PdfCompressionLevel.Normal
pdfConverter.PdfDocumentOptions.ShowHeader = true
pdfConverter.PdfDocumentOptions.ShowFooter = true
pdfConverter.PdfDocumentOptions.LeftMargin = 5
pdfConverter.PdfDocumentOptions.RightMargin = 5
pdfConverter.PdfDocumentOptions.TopMargin = 5
pdfConverter.PdfDocumentOptions.BottomMargin = 5
pdfConverter.PdfDocumentOptions.GenerateSelectablePdf = true

pdfConverter.PdfDocumentOptions.ShowHeader = false
'pdfConverter.PdfHeaderOptions.HeaderText = "Sample header: " + TxtURL.Text;
'pdfConverter.PdfHeaderOptions.HeaderTextColor = Color.Blue;
'pdfConverter.PdfHeaderOptions.HeaderDescriptionText = string.Empty;
'pdfConverter.PdfHeaderOptions.DrawHeaderLine = false;

pdfConverter.PdfFooterOptions.FooterText = ("Sample footer: "  _
            + (TxtURL.Text + ". You can change color, font and other options"))
pdfConverter.PdfFooterOptions.FooterTextColor = Color.Blue
pdfConverter.PdfFooterOptions.DrawFooterLine = false
pdfConverter.PdfFooterOptions.PageNumberText = "Page"
pdfConverter.PdfFooterOptions.ShowPageNumber = true

'pdfConverter.LicenseKey = "put your serial number here"
Dim downloadBytes() As Byte = pdfConverter.GetPdfFromUrlBytes(url)
Dim response As System.Web.HttpResponse = System.Web.HttpContext.Current.Response

response.Clear
response.AddHeader("Content-Type", "binary/octet-stream")
response.AddHeader("Content-Disposition", ("attachment; filename="  _
                + (downloadName + ("; size=" + downloadBytes.Length.ToString))))
response.Flush
response.BinaryWrite(downloadBytes)
response.Flush
response.End

ExpertPDF on Twitter Twitter
Follow us on Twitter for release notifications and special offers.


Latest news

Feb 11th, 2014
ExpertPDF Pdf Creator v9.1.0 was released. more details

Feb 11th, 2014
ExpertPDF HtmlToPdf Converter v9.1.0 was released. see what's new

Other tools:
Excel Library
RTF To PDF
PDF Security
PDF Images Extractor



ExpertPDF HTML to PDF Review
"HTML to PDF is a quality component that is clearly valuable to any Web developer in need of an easy and flexible way to generate PDF files."

Steve C. Orr - MCSD, Microsoft MVP in ASP.NET


more testimonials
customers list


Html to Pdf - 616 Corporate Way, Suite 2-4080; Valley Cottage, NY 10989; Phone: +4-0724-03-77-27, Email: office@html-to-pdf.net

Copyright 2014. Outside Software Inc.