I have created a site with a custom module built on top of OpenCart. It allows you to design a business card, brochure, or post card online (something like vistaprint but simpler) and generates a print ready file.
One of the requested features was a mail merge type feature for post cards. Basically the customer would create their design, then upload a csv file of the names and addresses they want the document mailed to.
My thought was after the order was placed a script on the server would go through the csv file, and create an image for each row. Basically inserting the mailing address onto the graphic and saving it as a copy. Once it was done with them it would bundle them into a pdf and send the printer a link to download the file.
That will work great if they are sending it to 100 people or less, but if they want to mail it to 10,000 people I don't see it working.
Does anyone have any experience generating a mass amount of graphics and giant pdfs? If so I would love their advice on how to implement it.
I have full control of the server, and can install or modify any software on it. It is Cent OS, with PHP, MySQL, and the works. I do not have any extra pdf extensions installed as I haven't needed them yet, but I can add them.
Other Notes:
- The resolution will be at 300dpi. Meaning each page of the pdf will be as much as 2,550 x 3,300px
- The final product doesn't have to be a pdf, it just needs to be a single file and printable
- I am currently rendering the graphics as a jpg or png
I do plan to post the module on OpenCarts extension directory after I have all of it working, so if it suits anyones needs it will be there once it is all working properly.