PDF Rendering Considerations
Understand the main Salesforce PDF rendering considerations before you build or troubleshoot PDF templates.
S-Docs PDF templates use Salesforce PDF rendering.
That engine works well for print-style documents. It also has a few important considerations to plan around.
Key Considerations
Some HTML and CSS rules render differently than they do in a browser.
PDF output relies on Salesforce's rendering engine.
The PDF rendering service outputs PDF version
1.4and supports CSS up to version2.1.JavaScript-rendered content is not supported.
Interactive form elements may not behave as expected in PDF output.
Modern web layout patterns are often less reliable than simple print markup.
Multilingual characters need extra testing.
Font support is more limited than in a browser.
Large pages, large PDFs, and heavy image usage can approach Salesforce rendering limits.
Not currently available
These PDF capabilities are not currently available:
fillable PDFs
password-protected PDFs
What To Avoid
Avoid these patterns in PDF templates when possible:
buttons, inputs, and browser-driven form behavior
JavaScript-dependent content
complex responsive layouts
advanced CSS that depends on modern browser support
Table-based layouts and simple CSS are usually the safest choice.
Font and language considerations
PDF rendering has stricter font support than normal browser output.
Salesforce documents four core PDF font families, plus Arial Unicode MS for multibyte characters, in its supported fonts reference.
Use it when your document includes non-Latin characters or multilingual content. Even then, test with real data before rollout.
If your template includes international characters, do not assume browser output and PDF output will match.
Some standard Visualforce components also have font-related limits in PDF output.
For example, components such as apex:pageBlock and apex:sectionHeader are not the best choice for double-byte font rendering.
Salesforce rendering thresholds
Salesforce also applies hard limits during PDF generation:
The page response before PDF rendering cannot exceed
15 MB.The generated PDF file cannot exceed
60 MB.Total image data included in the PDF cannot exceed
30 MB.
These limits matter most for:
image-heavy documents
long reports
packet-style PDFs with many related list rows
Inline CSS requirements
Inline CSS works only under specific conditions.
If you rely on inline styles in a Visualforce PDF page, use:
API version
28.0or laterapplyBodyTag="false"onapex:pageexplicit, valid
html,head, andbodytags
Without that structure, inline styling may not render as expected.
Best practice
Build PDFs like printable documents, not web pages.
Use:
simple HTML structure
table-based alignment when layout must stay fixed
basic CSS
supported fonts
Test early if your template includes:
multiple languages
special characters
rich text fields
complex spacing or page layout
Troubleshooting tip
If you are unsure whether an issue comes from the PDF engine, test the same pattern in a simple Visualforce PDF page.
That helps confirm whether the behavior is a Salesforce rendering limit or a template issue.
When a PDF fails or renders inconsistently, check these first:
unsupported JavaScript or dynamic browser behavior
unsupported fonts or multilingual characters
oversized images or overall output size
CSS that depends on browser features instead of print-safe markup
Related resources
Review PDF Templates for format guidance and build patterns.
Review Supported Fonts in PDF Format for font-specific details.
Review PDF Render Limitations for additional background and a Visualforce test example.
Review Salesforce's PDF rendering considerations.
Review Salesforce's supported PDF fonts.
Last updated
Was this helpful?

