TTA LogoTextToAnything.nl

PDF Generation in Deno

How to generate PDFs using TTA in Deno.

Generate PDFs in Deno

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

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

const PDFFile = await TTA.generatePDF("test.pdf", {
  header: "Header HTML",
  html: "<h1>Hello world!</h1>",
  footer: "Footer HTML",
  landscape: false,
  format: "A4",
});

Use TTA's PDF generation in Deno to create PDFs from HTML content. You can customize the header, footer, and layout (portrait/landscape) of the PDF.

The generated PDF file will be returned as a Blob.