It’s now possible to inject PDF attachments as text into Word/Excel template outputs in unison with field captured data.
Upload an ‘industry-standard’ A4 PDF document using our Attach Field and embed it within a custom data template. This feature will significantly improve processes requiring uploaded documents to be injected within your custom output.
By default, attached documents remain accessiblie via links after uploading.
How To
Our EMBEDPDF() function uses a fieldName or full URL link for use in Word and Excel Data Templates and can be injected in one of two ways:
- Reference the Attach field’s data name
{( EMBEDPDF({{fieldName}}) )}
- Reference a full URL link to a PDF
{( EMBEDPDF(‘http://full-url-link’) )}
Note
- When creating your Word/Excel data template, the EMBEDPDF() function should be placed separately on its own blank page. The PDF’s content will replace the blank page.
- If the EMBEDPDF() function isn’t placed on a separate page, the data template engine will presume that a new page must be created, and a page break will be placed before and after by our data template engine.
- Instead of a page break being added, it will remove the page the placeholder is on, so any other data on the placeholder page will be removed, and insert the PDF there
-
{( )} and {{( )}} are supported
-
If it is not exported to a PDF document, the placeholder will remain in the template export (being Word or Excel format, these can be manually removed.
Embedding Multiple PDF’s
It is possible to embed multiple PDF’s into a document output by utilising the {{!REPEATSTART}} function, adding a “Page Break” into the document and then having the EMBEDPDF() function output the PDF. Each EMBEDPDF() statement must exist on its own line, on its own page, in order for this to work. The screenshot below shows how to do this in MS Word.
Limited To
- PDF documents that can be embedded.
- “Output to PDF” cases (i.e. Export as PDF, Output File Format set to PDF).
More information on creating Data Templates might be of interest.