WelisaWelisa DocGen
v1.1.0 welisa.com

Limits & constraints#

Platform limits that shape what Welisa DocGen can do, and how it works around them so you rarely notice.

Apex heap#

  • Synchronous (the interactive runner): 6 MB.
  • Asynchronous (large-dataset batches, queueables, bulk): 12 MB.
  • Welisa DocGen routes by dataset size automatically — you never choose sync versus async.

PDF fonts#

Salesforce's PDF engine ships four fonts: Helvetica (sans-serif, the default), Times (serif), Courier (monospace) and Arial Unicode MS (symbols, checkmarks, CJK, Greek, Cyrillic, Hebrew — by name, and without a bold face). Custom fonts cannot be loaded: @font-face is not supported via data URIs, static resources or files, which has been tested exhaustively. Branded typefaces, barcode fonts and decorative scripts fall back to Helvetica in PDF. Workaround: generate DOCX, which keeps the template's fonts. Symbols and non-Latin text render as nothing under the default fonts — set font-family: 'Arial Unicode MS' explicitly.

What PDF cannot do#

Not supportedWhyWorkaround
Custom fonts, @font-faceFour built-in fonts onlyGenerate DOCX
Text boxes and shapes (Word)Drawing objects are not convertedUse tables for layout
SmartArt, Word chartsWord's own graphics are not rendered{Chart:…}, or insert an image
Wingdings / symbol fontsNot among the engine's fontsCheckbox glyphs auto-translate; use Unicode symbols in Arial Unicode MS
CSS Grid / Flexbox, border-radius, rgba(), gradients, shadowsCSS 2.1 rendererTables, flat hex colours
JavaScriptIgnored—
Even/odd page headers, multiple section headersOne header/footer set per documentPage breaks, not section-specific headers
Multi-column layoutsCSS columns unsupportedTables
PowerPoint → PDFThe platform cannot convert .pptxRender PPTX natively, or author in Word/HTML
Qualified Electronic Signatures (QES)SES is built in; QES needs a qualified trust service providerBuilt-in SES for most cases; DocuSign for AES

PowerPoint and Excel are alpha#

Core merge mechanics work — fields, parent lookups, loops (including PowerPoint slide-table rows and Excel row expansion), format suffixes — but expect rough edges: PowerPoint → PDF is not possible, complex Excel formulas may not survive merging, advanced PowerPoint layouts are best-effort. Excel does not yet render images, charts (a text placeholder), shared assets, or rich-text formatting. Macro-enabled .xlsm workbooks pass their VBA through byte-identical, but Excel blocks macros in downloaded files by default (recipients unblock or use a trusted location), and macros must reference ThisWorkbook rather than a hard-coded filename. For mission-critical decks and spreadsheets, render to PDF or DOCX.

Browser payload limit#

Salesforce caps individual server-to-browser responses at 4 MB. Large DOCX files are assembled in the browser and large PDFs are streamed in chunks and stitched client-side; you do not have to think about it.

Template and output size guidance#

ScenarioLimitExperience
Template upload (DOCX / PPTX)10 MBRejected with a "compress images" hint
Template upload (HTML)n/a — textOne click
PDF generate (download or save)~60 MB outputOne click
PDF Save to Record with attached images~30 MB of record imagesBlocked with a "use Download instead" message
DOCX / XLSX ≤ ~4 MBn/aOne click
DOCX / XLSX > ~4 MB, Downloadn/aOne click
DOCX / XLSX > ~4 MB, Save to Recordn/aTwo steps: download, then drag to attach
Combine PDFs / packetdownload onlyOne click

Why the 10 MB template cap? Every template is unzipped and pre-cached at save time inside a 12 MB asynchronous heap. Almost every 20 MB+ template is uncompressed images — in Word, right-click an image → Compress Pictures → Email (96 ppi); most templates drop to 1–2 MB. Why two steps above ~4 MB? Inbound browser-to-server payloads cap at roughly 4 MB; the file is downloaded and then attached through the platform's native uploader (2 GB).

Large child-record counts. Interactive generation of PowerPoint and Excel templates over a few thousand child records assembles the file in the browser (tested to 30,000 child records); Flow, batch and Apex entry points have no browser and keep the server-side heap guidance.

Large datasets (the "giant query" path)#

Records with roughly 2,000 to 50,000+ child rows are detected automatically and rendered in the background through cursor pagination and chained jobs. Same template, same button. For HTML templates, tags outside the large loop are limited to the families listed on the HTML templates page; Word templates run the full engine. Bulk jobs recover oversized records automatically (Bulk generation). Bulk jobs themselves cap at 50,000 records per job.

SOQL and chart budgets#

Multi-level queries use one SOQL per relationship depth. Chart aggregates are capped at 50 per transaction and render a visible "Chart limit reached" bucket beyond that.

Lightning Web Security#

If your org has Lightning Web Security enabled, Welisa DocGen works: binary data is routed through Apex rather than direct browser fetches, and Office downloads use a path that LWS does not block.

Guest user constraints (signing page)#

The signing page runs as a site guest user, which the platform restricts heavily. Consequences: a verified Org-Wide Email Address is required to send signing e-mails; on Experience Cloud sites the preference "Let guest users view asset files, library files, and CMS content available to the site" must be enabled or signers see "Document unavailable"; classic Salesforce Sites need no such preference.

Picklist values and upgrades#

A value added to a restricted picklist after an org's first install does not arrive with later upgrades (Salesforce does not push them). Fresh installs always have the full list. If a Type value is missing, add it by hand — Troubleshooting.