I am in the process of starting up a shopify store and need some assistance. I want to sell one digital product, however, my digital product consists of a PDF that is unique. Here is an example: A person buys my digital product. After checkout, PDF1 is sent. Another person comes along and buys the same product, but this time, PDF2 is sent and so on. Just say I have 100 PDFS in my que, but after each order, the next PDF in the que is sent. Does that make sense? Each PDF is similar in nature, however, each PDF contains a unique serial number, so it is important that no 2 customers receives the same PDF. I have been scratching my head on this one, but can’t seem to find any solution to my problem. I know SendOwl and FetchApp have the ability to send out unique serial numbers, but since my serial numbers are created beforehand and place in these PDF’s, it is important for me to be able to send out the PDF’s in chronological order automatically after an order is placed.
It sounds simple but it's tricky.... However this is what I would do.. With PHP I would use the libraries FPDF (site) which will allow you to generate a PDF document AND FPDI (site) which allows you to IMPORT a specified PDF page in to FPDI as a Template to modify or add to. Then generate a new PDF. So this is what I'd do... - Take customer to billing page. After successful purchase... - Take customer to confirmation page stating their PDF is being generated then in the background.... - Have a PHP script import a page from my base PDF file using FPDI. Use FPDF to modify the page and generate a new PDF. Then deliver the new PDF via email to the customer for download. I never tried this... you may have to import all pages in to a new PDF. But I would start there... It's not as simple as a line of code but it's not difficult either... Keep in mind... this won't stop hackers or anyone from "rebranding" or taking your pdf..
I did some searching on google.. check out this example https://daveismyname.blog/writing-to-an-existing-pdf-with-php also https://stackoverflow.com/questions/7364/pdf-editing-in-php Looks like you can ADD a page... but can't modify a page... But with FPDF you can generate a page easily... Hope this helps