PDF Templates

Introduction

PDF templates allow you to merge simple to complex data from Salesforce into PDF documents. They are built with the S-Docs Template Editor in Salesforce.

Info
You can also upload existing PDFs to Salesforce and tag them with drag-and-drop merge fields using the S-Docs PDF-Upload feature. Read more about PDF-Upload templates here.

Main Advantages

PDF is one of the most common S-Docs template formats, allowing for simple to advanced data merging, conditional logic, configurable runtime prompts, and more. PDF documents generated with S-Docs can also be enabled for live edit by end users in Salesforce.

PDFs display consistently and predictably across devices and operating systems. In addition, PDFs are self-contained, meaning the content is stored within the document itself. Therefore, internet connectivity is not needed to view embedded images.

Supported Features

Feature Supported?
Merge Fields
Related Lists
Conditional Logic
Live Edit
Runtime Prompts
HTML/CSS Source Editing
Named Queries
Template Header & Footer
Insert Component Templates
Mass Merge (Batch Generation)
Collect e-signatures with S-Sign

Recommended For

PDF templates are recommended for most standard document requirements, including quotes, invoices, customer communications, product information sheets, and much more.

PDF templates are also a good choice for documents that shouldn't be edited, since editing PDFs can be more difficult than other formats (as long as live edit is not enabled).

Main Limitations

While PDF templates are well-suited for most requirements, consider the following limitations.

PDF templates only support a limited number of fonts and CSS styles. To get the desired result, you may need additional editing time or are afforded some leeway on the final output. Other limitations include:

  • The PDF rendering service renders PDF version 1.4
  • The maximum response size when creating a PDF file must be less than 15 MB
  • The maximum file size for a generated PDF file is 60 MB
  • The maximum total size of all images included in a generated PDF is 30 MB
  • PDF templates support CSS 2.1. Some CSS attributes, such as word-wrap, are CSS 3, and are therefore not supported
  • PDF rendering doesn’t support JavaScript-rendered content
  • Fonts supported (specified as font-family): Arial Unicode MS, sans-serif, serif, Times New Roman, and Courier. Web fonts and other fonts are not supported. S-Docs provides additional support for MICR fonts.
  • “Arial Unicode MS” is the only font supported for extended character sets that include multibyte characters
  • Bold, italicized, or underlined text is not supported in PDF files that use Unicode fonts (if you have selected template contains international characters)
  • Fillable PDFs are not supported
  • Password-protected PDFs are not supported
  • The rendered PDF file either displays in the browser or is downloaded, depending on the browser’s settings. Specific behavior depends on the browser, version, and user settings, and is outside the control of S-Docs
  • If images outside of Salesforce are used in the S-Docs template directly, or dynamically through a merged image field, you must whitelist the URL domain (using Setup > Remote Site Settings) to avoid broken image icons in the PDF
  • The final document will render the markup and data, but it might not render formatting contained within the contents of rich text area fields, or image fields added to the template unless you specify them as containing markup
  • Long lines of text that don’t have break points likes spaces or dashes (such as long URLS) can’t be wrapped by the PDF rendering service and may “flow” off the side of the page, cutting it off. This can be fixed using the breakeverynchars attribute, which adds a line break after a specified number of characters.
  • If the PDF file fails to display all of the page’s text, particularly multibyte characters such as Japanese or accented international characters, make sure you check off Template contains international characters in the “Document Options” tab of the template editor. If merged field values are failing to render correctly, also set the Unicode enforcement level to Strict to override any font settings that are being applied to merged fields.
  • PDF rendering doesn’t support images encoded in the data:URI scheme format

Tags: ,

Was this helpful?