Page 1 of 1

pdf programming visually

Posted: Wed Dec 03, 2008 2:08 pm
by yacahuma
Does anyone knows of a product where I can draw a pdf, the same way you write a word document,

assign fields to it, and have the stubs generated to interface with it???

Re: pdf programming visually

Posted: Wed Dec 03, 2008 5:36 pm
by alex.barylski
You can generate a PDF in any creator....use Word and convert it using Foxit PDF creator (print driver).

Use placeholders, like:

%%FIRST_NAME%%

Inside the document and str_replace them on the fly. Make sure you are not encrypting the PDF though otherwise your str_replace will not work.

Alternatively, you oculd use a PDF library to dynamically construct PDF document using "blocks" and send out a completed PDF that way.

Maybe you could use: http://www.fpdf.org/

I am not clear on what you are trying to do though...

Cheers,
Alex

Re: pdf programming visually

Posted: Sat Dec 06, 2008 3:19 pm
by yacahuma
Well,

I finally found the answer . And like many times, it turns out to be a simple one.

Use Adobe Acrobat professional and create fields for the form. You can draw them on top of the existing pdf. Then using a little library
http://koivi.com/fill-pdf-form-fields/tutorial.php
you can search and replace for the fields you just created.

some info about fdf
http://www.citationsoftware.com/faqFDF.htm

Basically, the data is in one place and the form is in another.

I found another library,

http://www.setasign.de/products/pdf-php-solutions/fpdi/