Click to See Complete Forum and Search --> : how to generate a pdf document automatically?


gred
01-21-2004, 09:32 PM
I have a map USA with the 50 states divided into imagemaps.
When a website visitor clicks on any one state, a pdf document (test.pdf) opens in a new page.

It loads the same pdf document when clicked on any state except the name of the state is put on the top of the pdf. for eg: when NY is clicked, test.pdf is loaded with NewYork as the first line on the pdf. When CA is clicked, the same test.pdf is loaded except the top line now says California.

I want to do this to avoid putting 50 copies of test.pdf which is 2mb each.

Anyway, I tried a software online and it almost worked for me except the software itself is about 40mb. Is there any easy way?

Thanks in advance.

PeOfEo
01-21-2004, 09:56 PM
This is going to take a lot of work. It will require server side scripting and special components. But I am fairly sure that it is possible.

toicontien
01-22-2004, 12:05 AM
In fact, you should be able to accomplish just that using PHP. There are modules that you can add to PHP that allow you to create GIFs, JPEGs and PNGs, and also PDFs. I have a book entitled "PHP and MySQL Web Development" by Luke Welling and Laura Thompson (ISBN: 0-672-31784-2) that devotes a whole chapter to creating custom PDF files using PHP. It's been a pretty decent book all around. It really doesn't cover the PHP basics very well, but then again that's not what the book was written for.