From version 9.0.0, 3B can generate the final Document.pdf inside your Salesforce org, using Salesforce's built-in PDF renderer, instead of sending the document's render page to the external rendering service. This is called the native PDF engine.
Benefits of the native engine:
The external rendering service remains supported. NativeWithFallback provides automatic fallback after a native render failure. In version 10.0.0, new Templates and Sign Documents default to a Native record-level override. General Settings continues to default to NativeWithFallback.
The PDF Engine field on a Template or Sign Document takes precedence over General Settings. A Template override applies to its Document Traces and Redline Requests; a Document override applies to its Submission Requests. The same selection applies to manual and bulk regeneration.
New Template and Document records default to Native in version 10.0.0. Existing records are not backfilled by this default. Clear the record-level field to inherit General Settings, or select the external PDF service (picklist value Heroku) or Native with Fallback explicitly. A blank record override means inheritance, not external-only rendering.
The resolved engine behaves as follows:
| Value | Behavior |
|---|---|
blank General Settings or Heroku |
All PDFs are generated by the external rendering service, exactly as in previous versions. |
NativeWithFallback |
General Settings default. New documents render in-org; if the native render fails or the artifact cannot be rendered natively, the document is sent to the external rendering service automatically. |
Native |
Eligible artifacts render in-org. A native render failure is logged without retrying externally. Missing or oversized artifacts still route to the external service. |
Because General Settings is a hierarchy custom setting, you can enable the native engine for a single user or profile first (for example your admin team) and roll it out org-wide once you are happy with the output. For records that inherit General Settings, switching that setting to Heroku routes subsequent generation externally. Explicit Template or Document overrides continue to take precedence. No deployment is needed in either direction.
DocumentPdf.html, plus a DocumentPdf.json manifest and any extracted images) on the tracking record, alongside the existing Document.html.Document.pdf on the same record, exactly where the external service would have put it.Document.pdf itself and the original Document.html are always kept, and a cleanup problem never affects the generated PDF.Documents completed before the native engine was enabled do not have the print-optimized copy, so they are always routed to the external rendering service. This includes manual regeneration of older documents.
Every successful generation stamps these fields on the tracking record (Document Trace for Templates, Submission Request for Sign, Redline Request for redlining):
| Field | Contents |
|---|---|
| PDF Content Version Id | The ContentVersion id of the generated Document.pdf. |
| PDF Content Document Id | The ContentDocument id of the generated Document.pdf. |
| PDF Generated At | When the PDF was stored. |
| PDF Engine Used | Native or Heroku. |
Both engines stamp these fields. They give you:
From version 10.11.0, both engines store completed PDFs as Document.pdf for Templates, 3B Sign and Redlining. Previously, the native engine named Sign PDFs after the Sign Document. The signing page still gives the downloaded copy the Sign Document's name.
Native regeneration reuses the file referenced by PDF Content Document Id when it is valid and still linked to the tracking record. External regeneration attempts to align that file's title so the service can reuse it too. When the file is reused, generation adds a ContentVersion, retaining its ContentDocument Id while updating PDF Content Version Id, PDF Generated At and PDF Engine Used. This fixes engine switches creating a separate Sign PDF because the two engines used different file names.
| Situation | Behaviour |
|---|---|
| Native regeneration with a valid linked PDF reference | Adds a version to the referenced file regardless of its previous title. Standard generation titles the new version Document.pdf. |
| External regeneration with a valid linked PDF reference | Attempts to retitle that file Document.pdf so the external service can find and version it. |
| Missing, invalid or unlinked PDF reference | The stored reference cannot be reused. Native generation falls back to matching the file title, or creates a new file if none matches. |
A different Document.pdf already exists on the record |
External title alignment leaves the files unchanged to avoid an ambiguous target. Existing duplicates are not merged automatically. |
External title alignment is best effort. A failure is logged as a PDF Engine error and does not cancel the generation request, so the same ContentDocument Id cannot be guaranteed when alignment fails or a duplicate already exists.
Check PDF Content Document Id and the record's Files list. An older Sign PDF named after the Document can be retitled during regeneration. If another Document.pdf is already linked, have an administrator review the duplicate files before relying on the same file reference across engines. Preserve delivered signed PDFs and their evidence; do not assume an upgrade merges or repairs existing files.
After regeneration, check the four PDF audit fields to confirm the new version and engine. Regenerating without a pending unhashed signature audit does not replace stored signature hashes. See E-signature attestation and document validation.
The native engine uses Salesforce's built-in renderer, which is not a full web browser. Output is close to the external service for most documents, but there are known differences:
background-size: cover are ignored by the renderer, so size background artwork to the page dimensions before adding it to a template.If a Template depends on styling the native engine cannot reproduce, set its PDF Engine to the external PDF service (picklist value Heroku). NativeWithFallback retries render failures; it does not detect visual differences in a successfully generated PDF.
NativeWithFallback, a failed native render automatically calls the external rendering service with the same record. The document is delivered either way.Native, a failed render is recorded in the org: for Templates documents the Document Trace's error fields (Has Error, Error Message) are set; for Sign and redlining documents a Log Entry record (type PDF Engine) is created with the failure details and the record id.Monitor adoption with a report on Log Entry records of type PDF Engine, plus the PDF Engine Used field on your tracking records.
Templates can include repeating headers and footers in the native PDF's top and bottom margins, with an optional different first page. These also appear on audit trail pages. Size the content to its margin and review the generated output. See Headers and footers.