big problem

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
antas
Forum Newbie
Posts: 6
Joined: Mon Apr 14, 2003 7:41 pm

big problem

Post by antas »

hy guys,
i'm new to php programing, but i'm getting along with it.
i´m working on a project, that is very helpfull for me.
i have made all the site in php and html, but one of the links is a page that is created each day with microsoft word (damn!). I´m running RH8, apache and php4 in my server and my biggest problem is:
how to convert the doc file to pdf so that i can publish it automatically (i've already made the script to upload it and rename it automaticaly), but that no one can change the contents of the document. (i think pdf is the best way). so, how can i convert the word doc file into a pdf, without changing anything from the doc (including tables)? Please help me.
Thanks
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

there probably is a better/easier way to accomplish that but this is how I do it:
  • install a postscript printer that uses FILE: as port (usually I use Apple Color LaserWriter 12/600 from the w2k-install cd)
  • print the document with this printer and change the result file's extension to .ps
  • use ghostscript/ghostview's pdfwriter to create the pdf
There are some tools to automate this task (e.g. http://www.smile-to-me.de/tools.htm , sorry german site) available.
And also programs to convert the docs without having MS-word installed (e.g. http://www.winfield.demon.nl/), but imho the printer/ghostscript-combo produces the best results (things might have changed since my last search)
Post Reply