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"
V12EAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Applications

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.