• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 257
  • Last Modified:

Use PHP to autofill Word or pdfs

I have been given a set of 40+ Word docs that are password protected.  I need to use PHP to fill in the docs.  I can fill PDFs but have been givien protected Word docs with enterable fields.  The final product can be PDF or Word.  I just need to complete a document set and print them after collecting information through a Web interface.
1) Can I programatically fill these forms without having enterable field labels?  
2) Can I convert these to PDFs with tags or do I have to receive the docs unprotected to do this ?

I have a product from Setasign that I have used to complete pdf files with PHP but I've never worked with Word programmatically.  Furthermore, the solution must work on Linux.  I develop on Windows and production is on Linux.

Thanks
"under the gun"
0
V12E
Asked:
V12E
1 Solution
 
GrahamSkanRetiredCommented:
The Word document format (.doc) is propriety, so unless you can save the documents in some format other the Word's .doc, i.e. HTML, XML or RTF, and have resource (human or otherwise) for analysing documents so saved, you will need to use the Word Object library to edit them. That means having the Word application installed.

If PHP can do OLE Automation, and you have Word installed, is should be possible to enter data into the Form Fieds on a document that has that sort of protection.
0
 
V12EAuthor Commented:
M Word isn't available (to my knowledge) on Linux, I can't rely on having WOrd running for my solution I don't know about the open source Word-like product on Linux
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now