Templates

HTML Templates New

Build a template from HTML and CSS instead of a Word document. HTML templates are converted straight to PDF, which gives you full control over the markup.

Adding an HTML Template

  1. In Templates, click Template Builder.
  2. Choose HTML as the template source.
  3. Either:
    • Upload a file: drop an .html or .htm file (up to 10 MB), or
    • Write HTML code: paste or type your HTML in the code editor.
  4. PDF CreateMate analyzes the HTML, lists the placeholders it found, and shows any compatibility warnings.
  5. Continue through the builder steps as for any other template. See Upload Template.

Placeholders

Use the same placeholder syntax as in Word templates:

<p>Dear {{ firstname }} {{ lastname }},</p> <p>Your order total is {{ amount | currency:EUR }}.</p>

Copy placeholders from the Properties page so they use each property's internal name. Formatters and defaults work in HTML templates too.

Live Preview

The code editor shows your HTML next to a preview as you type. Placeholders appear as written in the preview and are replaced with real values when a document is generated. To check the result with HubSpot data, generate a test on the Test step.

Compatibility Warnings

HTML templates are rendered with DOMPDF, which supports most HTML and CSS but not everything a browser does. The builder warns you when it finds:

Warning What to do instead
Flexbox or CSS Grid (display: flex / display: grid) Use tables for layout
position: fixed Not supported for headers and footers; place them in the normal flow
External fonts (@font-face, Google Fonts) Use web-safe fonts or base64-embedded fonts
Background images (background: url(...)) Use <img> tags
External images (<img src="https://...">) Embed images as base64 data URIs so they always load
JavaScript (<script>) Not supported; scripts are removed
No DOCTYPE or <html> tag Add a full HTML document structure for consistent rendering
Warnings don't stop you from saving the template. They point out parts of your HTML that may look different in the PDF, so generate a test to check.

Fonts

Use web-safe fonts such as Arial, Helvetica, Times New Roman or DejaVu Sans, or embed a font as base64 inside an @font-face rule. External font URLs may not load. See Embedding Fonts.

Version History

Uploaded HTML files are kept in Version History, like Word and Google Docs templates. HTML code pasted into the editor is not versioned, so keep a copy of your code if you may need an earlier version.