Skip to main content
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 guide outlines a way to export data from ION using a tool we also use internally: Carbone.io.
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:
{
  partKit(id:780){
    _updated
    id
    deliveryLocation{
      address
    }
    partKitItems{
      part{
        partNumber
        revision
        description
      }
      quantity
    }
  }
}
JSON Response:
{
  "data": {
    "partKit": {
      "_updated": "2025-05-08T00:33:40.275245",
      "id": 780,
      "deliveryLocation": {
        "address": "600 Wilshire Blvd,\nSuite 1500,\nLos Angeles, CA 90017"
      },
      "partKitItems": [
        {
          "part": {
            "partNumber": "7777-03",
            "revision": "C",
            "description": "Wheel assembly"
          },
          "quantity": 4
        },
        {
          "part": {
            "partNumber": "1111-545-01",
            "revision": "B",
            "description": "Mounting screw"
          },
          "quantity": 8
        },
        {
          "part": {
            "partNumber": "7777-02",
            "revision": "B",
            "description": "Car body"
          },
          "quantity": 1
        },
        {
          "part": {
            "partNumber": "SA",
            "revision": "1",
            "description": "Spoiler Assembly"
          },
          "quantity": 2
        }
      ]
    }
  }
}

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](/images/legacy/Packing List.docx)
If you need more information on how to configure complex templates with Carbone.io, we recommend checking out their quickstart guide!
Once your template is ready, upload it to Carbone.io and pair it with the JSON data to generate the final PDF. You can preview and adjust formatting as needed until the output matches your expectations.
We recommend adding a few dynamic placeholders at a time in order to test and quickly debug if needed.
Each template created will have an ID and Carbone has an API key that you can use to automatically call it’s API and generate these reports. Here is an example of the Carbone.io studio which enables us to determine if the template is rendering the data correct.

Conclusion

This approach helps you generate clear, professional documents using the latest data in ION, with minimal overhead. It’s flexible, supports complex formatting, and can be adapted for a variety of export use cases. You can use the template ID and Carbone API key to setup automated workflows that upload PDFs to ION based on an event that is triggered. Let us know if you’d like help getting started or want to set this up as part of an automated workflow.

Carbone disclaimer

ION uses Carbone, a third-party open-source PDF generator, for PDF document creation via the API. Carbone is designed with privacy in mind: data is not stored and is used only for report generation. Reports are automatically deleted immediately after download, or within one hour, whichever comes first. For users requiring heightened data privacy, Carbone offers on-premise and AWS private cloud hosting options — see Carbone on AWS Marketplace. Carbone is an independent project, not maintained by First Resonance. For support, updates, or security inquiries related to Carbone, refer to its open-source community. ION ensures integration compatibility but does not assume liability for Carbone’s functionality or security.