HTML to PDF Merge Templates
Last updated
Last updated
For single-page and multi-page PDFs, it all starts at the HTML to PDF Merge Templates module in your left nav. This is where the top-level configuration interface exists for your PDF.
When you install Yansa PDF Generator, you will find an included HTML to PDF Merge Template named 'SAMPLE: Employee Offer Letter'. This is a great place to get started.
You can always use the Generate PDF button in the form header to test creation of a PDF from your template. This is great for iterating during your design & creation process.
Source table: The table to be used as the primary data source for dynamic data included in your PDF.
State: Only 'Published' templates will be visible in the PDF generation modal that is typically used by your users when they generate a PDF document.
Use advanced styling: Enable/disable the 'Advanced Styling' tab for enhanced CSS customization.
The HTML to PDF Merge Template form is organized into tabs to simplify configuration:
Content: The HTML content to be converted to PDF
Page Configuration: PDF page configuration details
Advanced Styling: Advanced CSS styling
HTML template: A custom HTML editor where you can design the content of the PDF to be created.
The HTML template field can include static, dynamic, and programmatic content. To include dynamic or programmatic content, you will reference an associated PDF Template Merge Map record. When doing so, simply use ${handlebar} brackets around the 'Merge key' value for the desired Merge Map.
For example, if you have a Merge Map record with a 'Merge key' of 'FIRST_NAME', you can include that dynamic value in your HTML template with ${FIRST_NAME}.
Page size: Desired PDF page size
Margins: Desired margins for top/bottom/left/right on the PDF
Header & Footer Configuration (Type):
Simple: In most cases, a 'Simple' header/footer is recommended. This provides options for including page numbers and a header/footer image.
Advanced: 'Advanced' headers/footers allow you to customize the HTML and Style tags for the header/footer. (Note: This requires advanced HTML knowledge)
CSS: Custom CSS to apply to the entire PDF template (Note: This requires advanced CSS knowledge)