1

My problem is rather simple:

I need a tool to merge some medium complex JSON input data inside a template PDF.
Then based on the data:
Some sections of the template could be replicated.
Some sections may be deleted and the gap created should disappear.
Tables could be filled by N elements without messing the formatting.
Tables could have "merged cells inside"

Also templates should be easily adjustable without re-writing the code, this means they could be: editable PDF, Word files, Spreadsheets, some tool's templates... (..html?)

In all the tools i tried (a lot! :(( ), one or more of the points above was always a nightmare.

So far i tried:

  • latex -> pdflatex -> pdf: this probably simply reduced my life expectation by 1.. 1 and a 1/2 years. Unfortunately the most powerful tool because.. Latex? anyway not maintainable at all
  • pdfminer\pdfjs\whatever npm pkg.. : coding always ends up in a low level mess or huge workarounds.
  • google sheets -> pdf: APIs are kind of hard, and anyway are cell\row based so it's difficult to manage dynamic sections
  • pdfgeneratorapi.com : basically what i needed with a rich editor in it, but formatting and aligning tables is bugged so results are always ugly. Also things like "merged cells" are not possible.

So question would be: is there a tool or package out there in 2022 capable of handling all these requirements at once?

OxPenguin
  • 93
  • 8
  • Hi! Tanel, founder of pdfgeneratorapi.com here. You are correct, our table component currently doesn't support "merge cell" or "merge row" logic. Please write to support@pdfgeneratorapi.com and we might be able to help you find a workaround that fits your requirements. – Tanel Mar 14 '22 at 11:31

1 Answers1

1

I would recommend using LaTeX for your PDF generation requirements. LaTeX comes with a huge number of available packages and chances are that someone has already solved your issue in LaTeX.

Specifically, DynamicDocs API by ADVICEment might be a good option for your requirements. DynamicDocs is JSON to PDF API based on LaTeX. Here are some features:

  • Ready-made JSON to PDF templates (no need to understand LaTeX)
  • Ability to write your own template in LaTeX and merge JSON to PDF using the R language layer, making the templates and their content dynamic
  • Excel to PDF Add-in (currently in Beta) to generate PDFs based on data in Excel
  • Each account is given a FREE plan with a limited number of monthly API calls

Disclaimer: I am involved in developing DynamicDocs API.

Igrod
  • 21
  • 3