79687547

Date: 2025-07-02 13:59:42
Score: 1.5
Natty:
Report link

I'm not familiar with the Figma API JSON, but I have tried many ways to produce PDFs from PHP over the last fifteen years. I have come to the conclusion that it's difficult to perform complex documents. The HTML/CSS support is limited, and it could take a long time to process complex or large documents.

In 2025, the best option is to delegate PDF production to a dedicated service, which is often based on a headless browser. For open source, there is the excellent Gotenberg project.

Otherwise, I found an API called PDFactorix that can generate a PDF from JSON data using a template defined in HTML and Twig to manipulate the data. One interesting function applies the template to each JSON object within a single PDF.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: noyam