PDF Generator
Audience:
Low-code EngineersSkill Prerequisites:
Actions,Tokens,HTML
The PDF Generator add-on adds actions that create and read PDF files. They build a PDF from HTML with tokens, combine, stamp and split PDFs, read the text out of a PDF, and check whether a PDF is signed.
These actions are part of the PDF Generator add-on (DnnSharp.PdfGenerator). The add-on is installed separately and needs the PDF feature in your license. If it isn't licensed, the actions fail. If you don't see the actions in the Documents group, the add-on isn't installed.
Choosing an action
| Action | What it does | Use it to |
|---|---|---|
| Generate PDF | Renders HTML with tokens into a PDF and saves it in a portal folder. | Create receipts, invoices, contracts or certificates from form data. |
| Merge PDF | Combines two PDFs into a new PDF, the pages of the first file followed by the second. | Add terms and conditions to the end of a contract, or a cover page to a report. |
| Overlay PDF | Draws the pages of one PDF on top of the pages of another. | Stamp a letterhead, logo or DRAFT watermark on a document. |
| Extract PDF | Copies selected page ranges of a PDF into a new PDF, in the order you list them. | Keep only the signature page, remove a cover page, or reorder pages. |
| Plain Text from PDF | Reads the text of a PDF into a token, and can run actions once for each page. It can also save the PDF's images. | Make an uploaded PDF searchable, or find a value such as an invoice number. |
| Check PDF Signature | Saves True or False in a token, depending on whether the PDF says it's signed. | Accept an uploaded contract only if it's signed. |
Where the files go
Generate PDF, Merge PDF, Overlay PDF and Extract PDF save the new PDF in a portal folder you choose, and return its URL, path or file ID in tokens. They don't send the file to the browser. Use Redirect to URL with the LinkClick URL token, or attach the file with Send Email.
- The folder must already exist. If it doesn't, the action fails.
- Files with the same name are overwritten. Put a unique value, such as an ID or a date, in the file name to keep older files.
.pdfis added for you. Don't add it to the file name yourself.- Extract PDF has no automatic name. Always set its File Name. Merge PDF and Overlay PDF use a random name when it's empty.
Generate PDF renders the HTML on the web server with wkhtmltopdf, which comes with the add-on. It uses an older WebKit engine, so tables, floats and inline styles are more reliable than flexbox and grid.
Combining actions
- Build, then assemble. Create a PDF with Generate PDF, then pass its output token to Merge PDF, Overlay PDF or Extract PDF. Merge PDF takes two files per action, so to merge more, feed each result into the next merge.
- Overlay PDF doesn't accept file IDs. Pass it a path or URL token, such as the Relative URL of the previous action.
- Reading text. To find values in the text read by Plain Text from PDF, use the Parsing actions, such as Regex.
- Signing. To sign a PDF with the user's signature token, use the PDF AutoSigner add-on. Then use Check PDF Signature on the server to check that the file came back signed.
What isn't covered
- Scanned documents. Plain Text from PDF doesn't use OCR, so pages that are images return no text.
- Password-protected PDFs. Merge PDF, Overlay PDF, Extract PDF and Plain Text from PDF can't open them.
- Validating signatures. Check PDF Signature only reads the file's signature flags. It doesn't check the certificate or whether the file changed after signing.
For Word and Excel files, see the Word and Excel add-ons. For CSV files, see Documents. To make the text of PDF files searchable in Search, see Search PDF Indexer. For all add-ons, see Add-ons.
Revised 10/02/2026