I'm building a website were users can customize PDF files (and preview
them). If they want to, they can let the website send the customized PDF
file to a printshop.
I let the organization build two PDF's:
1. "Background lots-of-bytes PDf file"
2. "Foreground only-some-words on some places PDF file"
(why do I use two files: Now I only need to send the small 2. file to the
print-office, so I don't need to RIP the 1. file every time I issue a
The user can only change the 'some-words' in the 2. file.
Therefore, I need to build/find something to:
a. Use 1. as a background, and layer 2. on-top of 1., so I can show a
preview in some way (a GIF or JPEG)
b. change the words in the 2. file.
Eg.: in the template, there are three words to be customized: %1, %2 and
So, I need to replace the %1 with the word entered by my website user.
Let's say that the %1, %2 and %3 are only shown horizontal etc., so that the
"%1" should be easily found in the PDF file....
Can I use a Delphi / C++ routine to just replace %1 with the right word?
Will the X,Y position be correctly?
Currently, I am thinking of the following:
Function a.: render the two PDF files to something like EPS, then render the
EPS to the right raster-format, then export to GIF or JPG
Function b.: Maybe a replace function in the binary file, but I don't know
enough from the PDF structure to see all the pro's and con's.