Help Center Document Generation Document Output Formats

Salesforce Document Output Formats: PDF, Word, Excel with Dochly

Updated June 2026 7 min read Document Generation
Dochly generates documents in three formats — PDF, DOCX (Word), and XLSX (Excel). Each format suits different use cases, audiences, and downstream workflows. Choosing the wrong format is one of the most common setup mistakes — this guide covers exactly when to use each format, what format-specific settings are available, and how to configure format defaults at both the org and template level.

Format overview

Dochly supports three 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.

When format matters most

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.

Where to configure format

Set the default format in Dochly → Settings → General. Override per template in the template settings. Override per generation in the generation modal or Flow action input. Template-level overrides the org default; generation-level overrides both.


PDF — Portable Document Format

PDF

PDF (.pdf)

Fixed-layout document — renders identically on every device and operating system

Recommended for most uses
Sent to customers or external parties
Sent for e-signature
Stored for compliance or audit
A formal legal document (contract, NDA)
Should not be edited after generation
Likely to be opened on mobile
  • The recipient needs to edit the document after receiving it (use DOCX)
  • The document is primarily a data export or financial model (use XLSX)
  • The document must be imported into another system that only accepts DOCX or XLSX
Page sizeA4 or Letter. Matches your configured page size setting. Set per template in template settings → Page Setup.
Page orientationPortrait (default) or Landscape. Use Landscape for wide tables — invoices, financial summaries with many columns.
Password protectionOptional — set a password in template settings to restrict opening or editing. Useful for documents containing sensitive financial or legal information.
Font embeddingSystem fonts (Arial, Calibri, Georgia) are embedded automatically. Custom fonts may not render correctly — use system-safe fonts for reliable PDF output across all readers.
PDF/A complianceEnable PDF/A mode for archival-quality PDFs — required for some regulatory and legal compliance workflows. Available in template settings → Advanced → PDF/A Mode.

DOCX — Word Document

DOC

DOCX (.docx)

Editable Word document — can be opened and modified in Microsoft Word or Google Docs

Use when editing is required
A draft that internal teams need to review and edit
A template for legal or HR teams to customize per case
Starting point for a document that goes through tracked changes
Imported into another Word-based system or workflow
  • The document goes directly to a customer — PDFs look more professional and prevent accidental edits
  • The document is used for e-signature — e-signature workflows require PDF format
  • Pixel-perfect formatting is critical — DOCX rendering can vary slightly between Word versions and platforms
Track changesNot applied by Dochly — the generated DOCX is a clean document. Recipients using Word can enable track changes after receiving it.
Document protectionOptional — set a Word document protection password in template settings to restrict editing to specific sections. Useful for templates with protected boilerplate and editable fillable areas.
Styles compatibilityNamed paragraph styles (Heading 1, Normal, etc.) are preserved in the DOCX output. Custom styles defined in the Dochly editor are mapped to standard Word styles on export.
Table formattingTables in the template export as Word tables — fully editable after generation. Style properties (border color, shading, cell padding) are preserved.

DOCX is the recommended format for generating a draft that will be reviewed and finalized before sending to a customer. The workflow: generate DOCX → internal review and edits → convert to PDF for customer delivery or e-signature.


XLSX — Excel Spreadsheet

XLS

XLSX (.xlsx)

Structured spreadsheet — tabular data with formulas, multiple sheets, and Excel-native functionality

Use for data exports and financial models
A data export for analysis in Excel
A financial model with formulas and calculations
Imported into another system as structured data
A budget report or financial summary for internal use
A line items extract for accounting or finance teams
Data that needs to be filtered or sorted by the recipient
  • The document is a formal customer-facing document — use PDF
  • The document requires rich formatting, images, or styled headers — XLSX rendering is minimal
  • The document is used for e-signature — e-signature requires PDF
  • The audience is non-technical and may not have Excel — PDF is universally accessible
Sheet structureDochly generates a single-sheet XLSX by default. Multi-sheet output can be configured in template settings → Advanced → Multiple Sheets for templates with multiple distinct data sections.
Column headersColumn headers from the template table structure are preserved as the first row in the XLSX output. Bold formatting and background color on the header row are maintained.
Formula fieldsMerge fields that resolve to numbers are stored as number values in cells — Excel can apply formulas to them. Fields that resolve to text are stored as text strings.
Date formattingDate fields are stored as Excel date values — Excel's own formatting applies. Apply a date filter in the merge field to ensure consistent display: | date: "MM/dd/yyyy".

Format comparison table

Feature / use case PDF DOCX XLSX
Customer-facing delivery ✓ Best ~ Acceptable ✗ Not recommended
E-signature compatible ✓ Yes ✗ No ✗ No
Editable after generation ✗ No (by design) ✓ Yes ✓ Yes
Rich formatting (images, colors) ✓ Full fidelity ✓ Mostly preserved ~ Limited
Data analysis / formulas ✗ No ✗ No ✓ Yes
Compliance / audit archival ✓ Best (PDF/A) ~ Acceptable ✗ Not recommended
Universal device compatibility ✓ Best ~ Requires Word/Docs ~ Requires Excel/Sheets
Internal review and editing ✗ Not editable ✓ Best ~ For data only
Data import to other systems ✗ No ~ Limited ✓ Best

How to choose the right format

Answer these three questions to identify the right format for your document type:

Format decision guide
Will this document go to an external recipient (customer, partner)?
Yes → PDF No → continue below
Will this document be signed electronically?
Yes → PDF (required for e-signature) No → continue below
Will this document be stored for compliance or legal purposes?
Yes → PDF (or PDF/A for archival) No → continue below
Does someone need to edit the document after generation?
Yes, text/layout editing → DOCX Yes, data/calculations → XLSX No → PDF
Is the output primarily structured data for analysis?
Yes → XLSX No → PDF

Setting the default output format

Dochly has three levels of format configuration — each overrides the one above it:

Org default (lowest priority)

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.

Template default (mid priority)

Set per template in the template settings → Output Format. Overrides the org default for that specific template. Use this to set Invoice templates to PDF while a Data Export template defaults to XLSX.

Per-generation override (highest priority)

Set in the generation modal when clicking Generate Document, or in the Flow action's Output Format input. Overrides both org default and template default for that specific generation only.

Scheduled job override

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 DOCX for an 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.

Common multi-format pattern

Generate both PDF and DOCX from the same proposal template: PDF is sent to the customer and stored for the record; DOCX is available for internal teams to reference or edit if needed. Both files appear in the record's Files list.

Storage consideration

Each format generates a separate Salesforce File — so generating PDF + DOCX 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:

E-signature

Only PDF documents can be sent for e-signature through Dochly's native e-signature feature. If a template is configured to output DOCX or XLSX, the Send for Signature option is unavailable until the format is changed to PDF.

Email delivery

All three 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. DOCX and XLSX require Word and Excel to open.

Salesforce Files storage

All three 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.

External integrations

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 all three formats, but some document management platforms have format restrictions.


Frequently asked questions

Not natively within Dochly — Dochly generates the format you configure and stores it as a Salesforce File. To convert, you'd need to download the DOCX and convert it externally, or regenerate from the same template with PDF as the output format. The most efficient workflow if you need both: configure the template to generate both PDF and DOCX simultaneously so both are stored on the record from a single generation.
DOCX rendering is controlled by the application opening it — Microsoft Word on Windows may render slightly differently to Word on Mac, or Google Docs. Font availability is the most common cause: if a font used in the template isn't installed on the recipient's computer, the application substitutes a different font which can change line spacing and layout. Use system-safe fonts (Arial, Calibri, Times New Roman) for the most consistent DOCX rendering across platforms.
Yes. In the template settings, go to Output Settings → PDF Protection. You can set an open password (required to view the PDF) and/or an editing/printing restriction password. Open passwords are set statically in the template — consider using a merge field if you want unique passwords per recipient. Restriction passwords prevent copying, printing, or editing within most PDF readers.
PDF/A is a standardized subset of PDF specifically designed for long-term archival — all fonts and resources are embedded, and interactive elements are removed. It is required by some regulatory frameworks (GDPR compliance, legal archival, government document filing). Enable it in template settings → Advanced → PDF/A Mode when your compliance requirements specify it. For standard customer-facing documents, regular PDF is appropriate and PDF/A is not necessary.

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.

Dochly
Salesforce AppExchange — UTECH HUB Install Dochly on AppExchange

Rated 5 stars · Native Salesforce app · Free to install