Getting Started

To get started, sign up for an account and log in. Once logged in, you can upload your templates and assets, bind them with data, and generate your first document. It is crucial that you create an API Key to get started. You will have 20 free credits so you can start tinkering right away.

The platform makes use of a templates in HTML that get injected with data that you provide as JSON. You can also bind a static asset -an image or a graph- to a property on the template. We make use of the conventions in Jinja templates for defining variables and control structures such as conditionals and loops, find more here.

Quickstart

- Go to API Keys and create a key if you don't have one. Ensure you have credits, you will receive 20 free credits when the API Key is first created.

- Download the quote.html template and upload it to your templates.

- Download this company-logo.png image and upload it to your assets.

Go to Documents. Click "New Document".

- Select quote.html from the templates dropdown menu.

- Copy this JSON and paste it entirely into the "JSON Payload" field.

- In the "Asset Bindings" section, type "logo" as the key and select company-logo.png from the values dropdown.

Click on generate document. The result should be this pdf. Now explore the html template, notice how the variables were injected with the JSON data and the image got injected in place of the "logo" placeholder.

Uploading Templates & Assets

To upload a template, navigate to the "Manage Templates" section on the dashboard. Templates must be in .html format and should be structured with placeholders for dynamic content according to the Jinja template design guide. Assets are any static resource that you could render on and html page. Upload an image to use on it in your first PDF doc!

Generating Documents

Once your templates and assets are uploaded, you can use them to generate documents. Simply select a template from the dropdown, provide a JSON payload to inject data, bind assets with key name placeholders, and hit the "Generate" button. Your document will be ready for download!

API Reference

📄 Get a PDF

Retrieve a previously generated PDF using its ID.


Endpoint

GET https://pdfinjector.com/public/api/pdf/<pdf-id>

Replace \<pdf-id\> with the actual ID of the PDF you want to retrieve.


Headers

Authorization: Bearer <YOUR_API_KEY>

Make sure to include your API key in the Authorization header as a bearer token.

Example Request

curl -X GET https://pdfinjector.com/public/api/pdf/abc123 \
  -H "Authorization: Bearer sk_test_abc123def456"

Managing API Keys

To manage your API keys, navigate to the "API Keys" section of your dashboard. You can create and rotate keys for secure API access.

Troubleshooting & FAQ

If you're encountering issues, check our FAQ section or reach out to support. Here are some common issues:
  • ❌ Issue generating document: Check your template and data format.
  • 🔑 API key issues: Ensure your API key is active and correctly linked.

Contact & Support

If you're still having issues, don't hesitate to reach out to us via email at luis@truedata.com.mx.