Salesforce Document Output Formats: PDF and HTML with Dochly
Format overview
Dochly supports two output formats. The right choice depends primarily on what happens to the document after generation — who receives it and what they need to do with it.
Format choice matters most when documents are delivered to external recipients (customers, partners, regulators) or when they need to be edited after generation. Internal documents that stay on the Salesforce record are less format-sensitive.
Set the default format in Dochly → Settings → General. Override per template in the template settings, or per generation in the generation modal. Template-level overrides the org default; generation-level overrides the template default.
PDF — Portable Document Format
PDF (.pdf)
Fixed-layout document — renders identically on every device and operating system
- The recipient needs to view the document directly in a browser without downloading it (use HTML)
- The document needs to be embedded directly in a web page or portal (use HTML)
- The document must be consumed as raw markup by another system (use HTML)
HTML — Web Document
HTML (.html)
Web-native document — renders directly in a browser and is lightweight to store or embed
- The document goes directly to a customer as a formal deliverable — use PDF
- The document is used for e-signature — e-signature workflows require PDF format
- Fixed pagination or a consistent print layout matters — HTML reflows based on the viewer's screen or print settings
HTML is a good choice when a document only needs to be viewed or embedded — for example, in an internal portal or a Salesforce community page. For anything sent externally as a formal deliverable, or requiring e-signature, use PDF instead.
Format comparison table
| Feature / use case | HTML | |
|---|---|---|
| Customer-facing delivery | ✓ Best | ✗ Not recommended |
| E-signature compatible | ✓ Yes | ✗ No |
| Editable after generation | ✗ No (by design) | ~ Via page source only |
| Rich formatting (images, colors) | ✓ Full fidelity | ✓ Mostly preserved |
| Fixed pagination / print layout | ✓ Yes | ✗ No (reflows to viewer) |
| Compliance / audit archival | ✓ Best | ✗ Not recommended |
| Universal device compatibility | ✓ Best | ✓ Any modern browser |
| Viewable directly in browser | ~ Requires a PDF viewer | ✓ Best |
| Embeddable in a web page or portal | ✗ No | ✓ Best |
How to choose the right format
Answer these questions to identify the right format for your document type:
Setting the default output format
Dochly has three levels of format configuration — each overrides the one above it:
Set in Dochly → Settings → General → Default Output Format. Applies to all templates and all generation attempts that don't have a more specific format configured. Set to PDF for most orgs.
Set per template in the template settings → Output Format. Overrides the org default for that specific template. Use this to set customer-facing templates to PDF while an internal reference template defaults to HTML.
Set in the generation modal when clicking Generate Document. Overrides both org default and template default for that specific generation only.
Set in the scheduled job configuration. Applies to all generations within that job run, overriding the template default. Useful for running the same template as PDF for monthly billing but HTML for a quick internal review cycle.
Generating multiple formats at once
Dochly can generate more than one format from a single template in a single generation. Configure this in the template settings or the generation modal by selecting multiple output formats. Each selected format produces a separate Salesforce File on the record.
Generate both PDF and HTML from the same proposal template: PDF is sent to the customer and stored for the record; HTML is available for internal teams to quickly preview in a browser without downloading a file. Both files appear in the record's Files list.
Each format generates a separate Salesforce File — so generating PDF + HTML creates two files per generation. For high-volume batch jobs, consider whether both formats are genuinely needed or if generating a single format reduces storage overhead.
Format and delivery considerations
The output format also affects what's possible for downstream delivery and processing:
Only PDF documents can be sent for e-signature through Dochly's native e-signature feature. If a template is configured to output HTML, the Send for Signature option is unavailable until the format is changed to PDF.
Both formats can be emailed as attachments when configured in the generation settings. PDF is the most universally compatible email attachment — no software requirement for the recipient. HTML attachments open directly in a browser, but are less commonly used as email attachments.
Both formats store as native Salesforce Files (ContentDocument) and appear in the Files related list identically — the format only affects what happens when the file is opened or downloaded.
If generated documents are automatically uploaded to Google Drive, SharePoint, or another system via a Salesforce Flow, ensure the target system accepts the format you're generating. Most integrations handle both formats, but some document management platforms have restrictions — confirm HTML support if that's your target format.
Frequently asked questions
Document Generation series complete
You've covered the full Dochly document generation guide series — from generating your first document to scheduling automated workflows, troubleshooting errors, and choosing the right output format for every use case.
Rated 5 stars · Native Salesforce app · Free to install