in reply to Word document to pdf file

You want to

  1. use antiword
    This will turn a silly m$ "word" file into simple text. Some formatting will be lost.
  2. use PDF::API2 to turn the output into a pdf file.

There is no point blank solution with this approach. You will have to code this.

Better yet, tell whomever is giving you m$ werd files to stop it. - Wait wait.. is it corporate? Are they telling ya - "no.. it has to be word to pdf.. we have all these word docs but our clients- some of them are silly people who don't have word ... we need them as pdf files so they can see them! And it must look the same!" - only.. the client machines can see it as if they had m$ werd.

Tell them they can choose but the solutions are what you offer. They are welcome to say 'no'.