Stirling-Tools / Stirling-PDF

#1 Locally hosted web application that allows you to perform various operations on PDF files
https://stirlingpdf.com
MIT License
43.6k stars 3.54k forks source link

[Feature request] Possible to MailMerge #237

Open esmoyer opened 1 year ago

esmoyer commented 1 year ago

I just got this spun up and exploring around but was curious is it possible or do would it ever be possible to do any type of "mail merge" by taking a CSV with data and mapping the columns to fields in the PDF to then spit out multiple PDFs? Similar to this: https://evermap.com/automailmerge.asp. Just curious. Either way, amazing application; can't wait to dig in more!

Frooodle commented 1 year ago

Seems quite complex, I'll add it to the list of enhancements to add :) But focusing on other features for now so will probably be months anyway

esmoyer commented 1 year ago

No worries, just wanted to be sure I didn't overlook something if it was already there since you have already done so much! Appreciate it!

esmoyer commented 8 months ago

Just curious if any other thought has been given to this? Thanks!

Frooodle commented 6 months ago

@esmoyer I am wanting to begin this work, could you provide a example PDF and csv file i can test on and expected output?

esmoyer commented 6 months ago

@esmoyer I am wanting to begin this work, could you provide a example PDF and csv file i can test on and expected output?

Absolutely, here is a really simple example. The CSV could have other random columns, but in this case the PDF to be generated only need the 3 data points. Not sure what would be easier to implement (or if it makes a difference on how concatenation works as it could technically be done in the CSV prior to upload). But basically a PDF form with the fields to be mapped/populated would be uploaded then upload the CSV with the data and then map the fields across. Ideally, it would be nice to be able to auto-name the generated PDF based on a field or fields from the CSV, but then it would spit out an individual PDF for each line in the CSV. Let me know if you need further examples or clarifications!

12w8e.pdf 2nuef.pdf 16xia.pdf mailmerge_example_csv.csv