Convert HTML to doc, text, pdf and rtf

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Ruchira Trivedi
Forum Newbie
Posts: 1
Joined: Tue Sep 13, 2005 2:30 am

Convert HTML to doc, text, pdf and rtf

Post by Ruchira Trivedi »

Hi

I need to convert HTML files to doc, text, pdf or rtf dynamically. I have tried using fpdf but the resulting pdf document has no formatting. I used strip_tags to convert to text but again the same formatting problem. I need something that i can integrate with my program. I have a LINUX server so can't use COM.
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

It's not possible unless you write an HTML parser in PHP. Some people have tried .. I've never seen one that actually works though. HTML is really, really complicated.
facets
Forum Contributor
Posts: 273
Joined: Wed Apr 13, 2005 1:53 am
Location: Detroit

Post by facets »

any chance you could push it through OpenOffice via the command line?
i know OO opens/edit html and creates doc and pdf's

just a thought..
Post Reply