This page was auto-migrated from the legacy ION manual. Some images and cross-links may need follow-up cleanup. Original:
_legacy-export/integrations/pdf-generator.md.This method does not protect ITAR-restricted data. See Carbone disclaimer below.
Step 1: Start with an Example PDF
Start with an example PDF you already use today, ideally one that includes all the data you want to share in the format your recipients expect. This could be a purchase order, audit log, or build report.Step 2: Define the Data Query
Using the ION GraphQL Explorer, create the API query you need to retrieve all of the information that appears in your example PDF. Identify a real object in ION, such as a purchase order, run, or quality issue, as a sample to build and test your query against. Ensure the query returns data in a structured JSON format that matches the fields and structure expected by the template you will create in Step 3. Below is an example of a query and the response. API Call:Step 3: Create the Template and Test
Use the example PDF from Step 1 as a guide to create a.docx or .odt template file. Your goal is to recreate the layout and structure of the PDF using Carbone’s templating syntax.
For each field in your JSON response from Step 2, insert a dynamic placeholder in the template to represent the data. For example, if you’re working with a part kit, your template might include placeholders like {data.partKit.id}, or {data.partKit.deliveryLocation.address}. Below is an example of a template we created to generate a packing list.
Download file
If you need more information on how to configure complex templates with Carbone.io, we recommend checking out their quickstart guide!
We recommend adding a few dynamic placeholders at a time in order to test and quickly debug if needed.