How PDFs are generated

The model

3B supports two PDF engines:

The PDF Engine field on a Template or Sign Document overrides General Settings, including during regeneration. In version 10.0.0, new Templates and Documents default to Native. Clear the record-level field to inherit General Settings, whose packaged default remains NativeWithFallback. A blank General Settings value or the Heroku picklist value selects the external service.

The pipeline, step by step

  1. A document is signed or completed. In multi-signer Sign and Redline workflows, this runs after each individual signature.
  2. The signing app uploads a print-optimized DocumentPdf.html artifact, its manifest, and any extracted images before it saves the signature or completion state.
  3. A record trigger publishes a PDF Generation Request platform event. The event is processed as Salesforce's internal Automated Process user, not as the guest signer.
  4. The engine router reads PDF Engine and inspects the artifact. An eligible artifact is rendered inside Salesforce for Native or NativeWithFallback. A blank or Heroku setting, a missing artifact, or an oversized artifact routes to the external service.
  5. The generated file is stored as Document.pdf on the tracking record. The PDF audit fields record its ContentVersion, ContentDocument, generation time, and engine.
  6. Temporary print artifacts are removed after successful generation. They are rebuilt automatically before the next signature.

See Native PDF engine for native rendering limits, output differences, and failure handling.

External rendering pipeline

When a request routes externally:

  1. 3B builds the URL of the matching read-only render page for the tracking record.
  2. The URL and page options are posted to the service configured in PDF Service.
  3. The service loads the page, waits for live data and document assets, captures the result, and saves the PDF back to the target Salesforce record.
  4. The app or automation can use the PDF audit fields to detect the completed file.

Because the rendering service reaches back into the org to load the render page and to save the file, the render pages must be reachable by that service (see guest access below).

The render pages

Each document type has its own read-only render page. These are the pages the rendering service loads:

Page Renders Keyed by
GeneratedDocument A completed Templates document Document Trace id
Generate A Sign document / signing render template, record, submitter, request ids
Preview Internal preview host context ids

The read-only previewer apps (Templates preview and the Sign generator view) render these same pages in a clean, print-friendly mode with no interactive controls, which is what makes them safe for the rendering service to capture.

Page options

When a PDF is requested the app passes rendering options:

For Templates, these come from the template's page setup and margins. They can also be supplied explicitly when regenerating a PDF manually.

Where files are stored

Generated artifacts are stored as files (ContentVersions) on the tracking record, addressed by a fixed file name:

File name Contents
Document.pdf The final rendered PDF
Document.html The completed document markup
DocumentPdf.html / DocumentPdf.json Temporary print-optimized copy and manifest used by the native PDF engine
Signature.json / Signature.png Captured signatures
Template.3bt The compiled Templates definition (on the Template)
PDFConfig.3bt The Sign field layout (on the Document)

Version 10.11.0 standardises Sign's stored PDF name as Document.pdf across both engines. Regeneration adds a version to the existing linked PDF when its reference is valid, including when switching engines. Older duplicate files and external title-alignment failures need separate review. See File name and versioning for the conditions. The Sign download page still names the downloaded copy after the Sign Document.

Every file is shared so that guest and community users can read it. This is essential: if a file's sharing is wrong, external signers and the rendering service cannot read it.

Guest access requirement

The rendering service is external to your org. It reaches the render page using a short-lived signed key issued for the guest context. For this to work:

Service endpoints

Configured in General Settings:

Setting Role
PDF Service The rendering service that converts a page to a PDF (async).
PDF Gen Base URL Public base URL the service uses to reach your render pages.
Files Endpoint File-processing service used for uploaded-PDF flattening and image conversion in Sign.

When it goes wrong

If the service was unreachable or misconfigured at completion time, the record will exist without its Document.pdf. You can regenerate it without involving the recipient. See Manual PDF regeneration.

Headers, footers and completed-document access

Both PDF engines repeat a Template's configured header and footer on every page, including audit trail pages. The completed Document.html stores the merged header and footer, so regeneration uses those stored values. See Headers and footers.

CC observers can download the final PDF once signing is complete without rejection and the PDF generation metadata covers the latest signature. Their download uses the stored file references, so renaming a file does not break the link. Intermediate signing PDFs are not exposed through observer links.