|
|
edit PDFs
|
|
|
|
Grizzled Veteran
Join Date: Oct 2003
Status:
Offline
|
|
Does anyone know if it is possible to edit a PDF file with PHP?
For example, say I have a document template set up with some fields that need filled in on a per user basis. Rather than generating the PDF from scratch, I'd like to be able to save that template as a PDF, have PHP open it, and be able to insert the data, and resave it.
I'm not if this is possible. I've been looking around haven't found anything, but thought I'd ask.
Though might just use RTF since the text is stored as plain text in the file. But I hate how neither Page nor TextEdit support embedded images or tables in RTF, thus forcing the user to have MS Word, whereas a PDF is more universal.
|
The only thing necessary for evil to flourish is for good men to do nothing
- Edmund Burke
|
|
|
|
|
|
|
|
Clinically Insane
Join Date: Nov 1999
Status:
Offline
|
|
PHP has an extension for this; I think it's called pdflib or libpdf or something like that. I don't have any experience with it, so I'm not certain if it does exactly what you want, but it would be a good place to look.
|
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status:
Offline
|
|
Originally posted by madmacgames:
Does anyone know if it is possible to edit a PDF file with PHP?
Good news - yes, it's all possible.
Bad news - you need to pay a reasonably large licence to use that functionality.
Visit http://www.pdflib.com/ and view the price for PDF + PDI (PDF Import)
If the budget's not a problem, then dive right in. I've written a complete PDF import library for another client, so if you need any pointers I can certainly help out.
|
Computer thez nohhh...
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Feb 2005
Location: Finland
Status:
Offline
|
|
|
"Solitido coeli junua."
iBook G4/1,2 GHz
768 MB
60 GB
|
|
|
|
|
|
|
|
Addicted to MacNN
Join Date: Jan 2000
Location: Stoneham, MA, USA
Status:
Offline
|
|
Another suggestion would be to make a default PDF with values like {USER_NAME} and {USER_ADDRESS}. Then when the file is requested, have PHP read the file in, substitute the info in the file, and then echo it out as a pdf document. That should make it download as a normal PDF with custom info inside. That SHOULD work, though I've never really taken a hard look inside a pdf document, that might effect layout etc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|