ScreenshotNeo

BlogHTML to image & PDF

How to Generate PDF Documents from Templates in Appian

Use Appian’s PDF Doc From Template smart service to fill Acrobat forms, save PDFs, handle runtime templates, permissions, errors, and outputs.

By the ScreenshotNeo team1 October 20266 min read

Appian generates a PDF from a template with the PDF Doc From Template process-model smart service. The service fills an Adobe Acrobat PDF form with process data and saves the completed document. Your template must be an Acrobat form stored in Appian Document Management; an ordinary, non-form PDF will not provide fields for substitution.

The procedure below follows Appian 24.3 documentation. Node behavior and interface details can differ in your deployed Appian version, so verify the current documentation before releasing a process.

What you need before starting

  • An Adobe Acrobat PDF form with named fields.
  • The form uploaded to Appian Document Management.
  • A process model with data available for each form field.
  • A destination folder, or an existing document to replace.
  • A run-as user that can retrieve the template and write to the destination.

Image fields are not recognized in the substitution grid. Do not design this workflow around replacing an image field through this smart service.

Step-by-step: create a PDF from a template

  1. Add the smart service. Open the process model, find PDF Doc From Template under document-generation smart services, and add it to the process. Appian documents its assignment option as Always Unattended.
  2. Select the base template. In Setup, choose a PDF by name or browse Appian Document Management. The documented browser selects PDF files. The selected file must be an Acrobat form.
  3. Map form fields. After selection, Appian scans the form and populates the substitution grid. Map each recognized field to a process variable, constant, or expression that returns the value for that field.
  4. Choose the destination action. Configure the node either to replace an existing document or create a new document.
  5. Configure a new document when needed. Set the file name, destination folder, and optional description. Avoid characters Appian disallows in file names: /, \\, :, ;, <, >, ", *, ', and ?.
  6. Store the result. In Outputs, select New Document Created and map it to a process variable whose type is Document. Later nodes can use that variable to move, email, archive, or otherwise process the generated PDF.
  7. Validate permissions and error handling. Confirm that the run-as user can read the template, access the replacement document when applicable, and write to the destination folder.

Core configuration checklist

Setting What to configure Common failure
Template PDF form in Appian Document Management Ordinary PDF has no recognized form fields
Substitution grid Map every required Acrobat field Blank or incorrectly typed values
Runtime Template Optional expression selecting a template at runtime Runtime field is absent from the base template
Destination Replace a document or create one in a folder Missing folder, invalid name, or insufficient rights
Output New Document Created mapped to a Document variable Later process steps cannot reference the result
Run-as user Read template and write destination permissions Exception or paused process

Using a runtime template

Set Runtime Template to a process variable or constant when the process must choose among templates. Appian states that runtime substitution fields do not have to exactly match the base template, but every field used by the runtime template must exist in the base template. Design the base form with the complete field set your runtime choices may need.

Template changes require version planning:

  • A new template version with identical field names and properties can update active processes according to Appian’s documented behavior.
  • If fields or their properties change, remap the node inputs and republish the process model.
  • Edit active processes when they must use the changed template.

Example process data mapping

Suppose the Acrobat form contains fields named customerName, invoiceNumber, and totalDue. Create process variables such as:

pv!customerName     /* Text */
pv!invoiceNumber    /* Text */
pv!totalDue         /* Number or Decimal */

In the substitution grid, map each form field to its matching process variable or to an expression that formats the value. Keep formatting decisions in the process model so the template remains responsible for layout.

Replace an existing document or create a new one?

Create a new document

Use this when each process instance should produce a separate PDF. Configure a deterministic name, destination folder, and optional description, then capture the generated document in a Document process variable.

Replace an existing document

Use this when a known document is being refreshed. The run-as user needs access to the document being replaced as well as the template. Verify that downstream users and integrations do not depend on the previous document version or file name.

Troubleshooting

Symptom Likely cause Fix
Template cannot be selected File is not a PDF, is not in Document Management, or is not an Acrobat form Upload the correct PDF form and confirm it contains named Acrobat fields.
Substitution grid is empty PDF contains no supported form fields, or fields are image fields Inspect the form in Acrobat and add supported named fields. Image fields are not recognized.
Values are blank Field name mismatch, null process value, or mapping not saved Compare names exactly, provide non-null values, and inspect every grid row.
Runtime template fails A runtime field is not present in the base template Add the field to the base form, remap inputs, and republish as required.
Process pauses or reports an exception Run-as user cannot retrieve the template or destination resource Grant read access to the template and write/access rights to the destination and replacement document.
New file is not created Destination folder is missing or the name contains a disallowed character Confirm the folder exists and remove / \\ : ; < > " * ' ? from the name.
Downstream node has no PDF Output was not mapped Map New Document Created to a Document process variable.
Changed template has old mappings Field definitions changed after publication Remap node inputs, republish the model, and update active processes.

Reliability and operations

  • Use stable template names or a controlled template-selection variable.
  • Keep template versions in a governed folder and document field-name changes.
  • Test with the same run-as identity used in production; designer access does not prove runtime access.
  • Persist the output Document variable before branches that need the generated file.
  • Handle missing templates, missing folders, and permission exceptions through your process’s operational error path.
  • For high-volume generation, monitor document repository capacity and process queues in your Appian environment. The cited documentation does not provide a throughput benchmark.

When to use another Appian template service

Choose the service that matches the required output. Appian documents separate services for HTML, Word 2007 DOCX, OpenOffice Writer ODT, and text-oriented formats. Those services are different output paths; they are not substitutes for filling an Acrobat PDF form. Check the documentation for your deployed release before selecting one.

Or skip the browser setup

If your application only needs a rendered image or PDF of a web page, ScreenshotNeo provides a website screenshot API and MCP server. It is separate from Appian’s form-filling smart service, but can be useful when the source is HTML rather than an Acrobat form.

Use the API with one request. See the ScreenshotNeo API documentation for all options.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

Cookie banners, newsletter popups, and chat widgets are removed before the shot. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed; response headers identify the page verdict and billing status. An MCP server lets AI agents such as Claude and Cursor take screenshots. The Free plan includes 1,000 screenshots each month with no card, and paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.

FAQ

Can I use any PDF as the template?

No. The documented smart service requires an Adobe Acrobat form stored in Appian Document Management.

Does the service replace images in a PDF?

No. Appian does not recognize image fields in the substitution grid.

Can the process choose a template at runtime?

Yes. Configure Runtime Template with a variable or constant, while ensuring runtime fields exist in the base template.

What happens when permissions are missing?

Appian documents exceptions for missing or unretrievable templates. Insufficient access or missing destination resources can notify the Process Administrator and pause the process.

Which Appian release does this guide describe?

The cited smart-service page is for Appian 24.3. Verify node behavior and interface details against your deployed version.

Primary source

Appian: PDF Doc From Template Smart Service (24.3)