PDF Generator
HomeBlogDocsContact
  • Overview
    • Try It!
    • Introduction
    • Key Features
    • Industry Use Cases
      • PDF Generator for Human Resources
    • Videos
  • Technical Docs
    • Getting Started
    • Building a PDF Template
      • HTML to PDF Merge Templates
      • Printable Labels
        • Label Templates
        • Label Configuration
        • Adding New Avery Type Label Configuration
        • Printing Labels
      • Merge Keys
      • Data Sources
    • Generating a PDF Document
      • Create from Wizard
      • Create from Flow Action
      • Create from Script
    • The Generate PDF Wizard
      • PDF Wizard (Standard Forms)
      • PDF Wizard (Workspaces)
      • PDF Wizard (List View)
    • Adding QR / Barcodes to PDFs
      • How-to Create Barcode Labels
    • TinyMCE Configs
    • Logging
    • Troubleshooting
Powered by GitBook
On this page
  • Content
  • Page Configuration
  • Advanced Styling
  1. Technical Docs
  2. Building a PDF Template

HTML to PDF Merge Templates

PreviousBuilding a PDF TemplateNextPrintable Labels

Last updated 11 months ago

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

Content

  • HTML template: A custom HTML editor where you can design the content of the PDF to be created.

Content for the HTML Template

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 Configuration

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

Advanced Styling

  • CSS: Custom CSS to apply to the entire PDF template (Note: This requires advanced CSS knowledge)

The HTML template field can include static, dynamic, and programmatic content. To include dynamic or programmatic content, you will reference an associated record. When doing so, simply use ${handlebar} brackets around the 'Merge key' value for the desired Merge Map.

PDF Template Merge Map
HTML to PDF Merge Template
Content
Page Configuration
Advanced Styling