PDF Generation Guide
Producing Premium, Branded Verification Assets
1. Requirement
Truthlocks utilizes standard Markdown combined with an embedded print-optimized CSS file (print.css) to ensure consistent, premium styling across all exported assets.
2. Recommended Tools
For high-quality output, use one of the following methods:
Option A: VS Code (Markdown PDF Extension)
- Install the Markdown PDF extension.
- In settings, set
markdown-pdf.stylesto includedocs/packs/enterprise/print.css. - Right-click any
.mdpack and select Markdown PDF: Export (pdf).
Option B: Command Line (Pandoc + PrinceXML)
For automated CI/CD pipelines, we recommend PrinceXML for superior CSS support.
pandoc B2B_ONBOARDING_PACK.md -t html --css print.css | prince - -o OUTPUT.pdf
Option C: Browser (Print-to-PDF)
Navigate to the pack preview in the Docs Site:
- Press
Cmd + P(orCtrl + P). - Ensure "Headers and Footers" is unchecked.
- Set "Background Graphics" to ON.
- Save as PDF.
3. Styling Constraints
- Fonts: We use
Intervia Google Fonts. Ensure you have internet access or the font installed locally. - Colors: Our brand accent is Cyan (
#06b6d4). - Page Breaks: Use
<div class="page-break"></div>to force content to the next page in long documents.
4. Troubleshooting
- Images Not Loading: Ensure image paths are absolute or relative to the markdown file.
- Table Overflow: Avoid tables with more than 5 columns for A4 portrait layout.
- Code Block Truncation: Our CSS automatically wraps long lines, but manually breaking long URL parameters is recommended.
[!IMPORTANT] Always verify the PDF output for correct page numbering and header alignment before sending to enterprise clients.