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    

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).