imtiyaz121
asked on
Embed data into PDF form on web server
I have one PDF form for submitting data to a php script. i have successfully done that,
but now i am unable to embed data into PDF form, so that i can send a .pdf file as an attachment in email.
I have read lot about FDF to fill PDF form, but i think it is useful only when one opens fdf or pdf file from browser.
Is it possible to fill PDF form on web server with data from database?
but now i am unable to embed data into PDF form, so that i can send a .pdf file as an attachment in email.
I have read lot about FDF to fill PDF form, but i think it is useful only when one opens fdf or pdf file from browser.
Is it possible to fill PDF form on web server with data from database?
ASKER
hi tomvergote
The given link is to create a pdf file from scratch, and it is using PDFLib that is not free for commercial use :(
While i already have a pdf file with form created in Adobe Acrobat, and i want to insert data into that file on web server.
The given link is to create a pdf file from scratch, and it is using PDFLib that is not free for commercial use :(
While i already have a pdf file with form created in Adobe Acrobat, and i want to insert data into that file on web server.
maybe a bit of a brute force way, but try to open a pdf in notepad or another text editor, as you can see it's plain text.
you could put strings in your pdf like "MYOWNCUSTOMFIELD0001" and then have php open the pdf file as plain text and do a string replace
you could put strings in your pdf like "MYOWNCUSTOMFIELD0001" and then have php open the pdf file as plain text and do a string replace
I work a lot with PDFs and here are a couple more alternatives (not sure the brute force way would work as I've tried to modify PDFs with notepad and it always ends up damaging the file):
1) ActivePDF Toolkit provides a way tool to do that (I've used Toolkit and would recommend it .. their other tools I'm not so sure I'd recommend)
http://www.activePDF.com ... (this is not free, but already has built in methods for form filling from a database or whatever)
2) Ghostscript tools can also do this if I recall (I've used it for generating PDFs and applying security and things, but not for form filling)
http://www.cs.wisc.edu/~ghost/ It's free (GNU public licence) but will require a bit of extra coding to work with it .. for what I've used it for it works flawlessly
1) ActivePDF Toolkit provides a way tool to do that (I've used Toolkit and would recommend it .. their other tools I'm not so sure I'd recommend)
http://www.activePDF.com ... (this is not free, but already has built in methods for form filling from a database or whatever)
2) Ghostscript tools can also do this if I recall (I've used it for generating PDFs and applying security and things, but not for form filling)
http://www.cs.wisc.edu/~ghost/ It's free (GNU public licence) but will require a bit of extra coding to work with it .. for what I've used it for it works flawlessly
ASKER
I have tried the given solutions, but it is not upto my needs.
At last i found a pdftk tool from www.accesspdf.com that can do what i want
At last i found a pdftk tool from www.accesspdf.com that can do what i want
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.devarticles.com/c/a/PHP/Use-PHP-to-Create-Dynamic-pdf-Files/