PDF Generation from template in Javascript

How to generate PDF from a template using TTA in Javascript.

Generate PDF from a template in Javascript

import { TextToAnything } from "@texttoanything/nodets";

const TTA = new TextToAnything(/*API token here*/);

const PDF = await TTA.generatePDFFromTemplate("test.pdf", TEMPLATE_ID, { 
  name: "World!" 
});

Use TTA's PDF generation in Javascript to create PDFs from a template. You can configure the template in our dashboard.

The generated PDF file will be returned as a Blob.