Table of Contents
- Getting Started
- EO.Pdf
- Overview
- Installation and Deployment
- Using HTML to PDF
- Using HTML to PDF
- Quick Start
- Setting Page Size and Margins
- Resizing Output
- Output Paging
- Web Page Authentication
- HTTP Post and Headers
- JavaScript in HTML
- Conversion Trigger
- Links in HTML
- Page Header and Footer
- Partial Page Conversion
- Repeating Table Header and Footer
- Merging Multiple HTML pages
- Generating Page Images
- Using with PDF Creator
- Creating Interactive Form Elements
- Working with Secure Pages
- Using HtmlToPdfSession object
- Troubleshooting HTML to PDF
- Debugging HTML to PDF
- Using PDF Creator
- Working with Existing PDF Files
- Using in Web Application
- Advanced Topics
- EO.Web
- EO.WebBrowser
- EO.Wpf
- Common Topics
- Reference
Merging Multiple HTML Pages |
You can merge multiple HTML pages into a single PDF file simply by calling ConvertUrl multiple times with the same PdfDocument object. For example:
//Create a new PdfDocument object EO.Pdf.PdfDocument doc = new EO.Pdf.PdfDocument(); //Convert three different pages into the same PdfDocument EO.Pdf.HtmlToPdf.ConvertUrl("c:\\1.html", doc); EO.Pdf.HtmlToPdf.ConvertUrl("c:\\2.html", doc); EO.Pdf.HtmlToPdf.ConvertUrl("c:\\3.html", doc); //Save the PDF file doc.Save("c:\\result.pdf");
By default each conversion starts a new page. You can call EO.Pdf.HtmlToPdf.Options.Follow to instruct the converter to render the next conversion's output immediately after the previous one on the same page.