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
Using with PDF Creator (ACM) |
HTML to PDF can be used together with PDF Creator (ACM - Abstract Content Model). ACM is a layout engine that conceptually is very similar to HTML, but is much simpler thus faster.
ACM is usually used inside the HTML to PDF converter's BeforeRenderPage or AfterRenderPage handler to render additional page content. The following code demonstrates how to use ACM to render additional output:
//Provide AfterRenderPage handler EO.Pdf.HtmlToPdf.Options.AfterRenderPage = new EO.Pdf.PdfPageEventHandler(On_AfterRenderPage); //This function is called after every page is created private void On_AfterRenderPage( object sender, EO.Pdf.PdfPageEventArgs e) { //Create an AcmText object AcmText header = new AcmText("page header"); //Create the AcmRender object on the current page AcmRender render = new AcmRender(e.Page, 0, new AcmPageLayout(new AcmPadding(1, 0, 1, 0))); //Render the text render.Render(header); }
ACM can also be used to output low level contents, such as curves and shapes to the page. For more information see PDF Creator (ACM).