Aaron
Aaron

Reputation: 3068

Generate a pdf from a pdf "template" in Meteor

I'm looking to generate a pdf from an existing pdf "template". For example, the pdf "template" would have the, text, fields, and layout -- all that would be left to do is fill in "fields" with data.

I would like to populate these fields with the appropriate data from a mongo collection, and generate a new pdf from it.

I am looking at the pascoual/meteor-pdfkit package, but I only read about how to generate a pdf from scratch. Also, I reviewed http://pdfkit.org/ but found no examples of my approach.

Is the above possible with an existing meteor pdf package? What's the best way to go about this?

For example, the following is part of a pdf document, the "fields" need to be populated with data I get from a collection: enter image description here

UPDATE: I'm looking into using pdftk server: https://www.pdflabs.com/tools/pdftk-server/ (the command line) to do form fill pdf (fdf). This seems to do what I want, and runs on all platforms.

Upvotes: 1

Views: 1334

Answers (1)

Aaron
Aaron

Reputation: 3068

Ended up using FDFs (actually XFDFs) to do the PDF form fills. PDFtk server was the tool I ended up using.

Upvotes: 1

Related Questions