By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,550 Members | 1,161 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,550 IT Pros & Developers. It's quick & easy.

Converting MSWord Docs to PDF

P: n/a
Hello,

this is my first message sent to the python-list, so
forgive any irregularities.

is it possible to convert MSword docs into PDF format?
i told my future employer that i could, because i knew
of the COM scripting abilites that activePython had.
and i knew there was modules for PDF creation such as
reportlabs.

thanks

Melv
Oct 10 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
me**@awc.edu enlightened us with:
is it possible to convert MSword docs into PDF format?
Yes, it is. check out http://www.stuvel.eu/ooo-python#header3. It's
about converting Excel to PDF, but it equally applies to MSWord.

Sybren
--
Sybren Stüvel
Stüvel IT - http://www.stuvel.eu/
Oct 10 '06 #2

P: n/a
Sybren Stuvel wrote:
me**@awc.edu enlightened us with:
>>is it possible to convert MSword docs into PDF format?


Yes, it is. check out http://www.stuvel.eu/ooo-python#header3. It's
about converting Excel to PDF, but it equally applies to MSWord.
However, this assumed perfect import of the .doc file into Open Office,
which can't be guaranteed (though it gets better every release). So you
may want to do some experimentation to find out how well the import
proceeds.

If that *isn't* satisfactory then a modest investment in Adobe
Acrobat/Distiller plus the use of Python's scripting facilities to
direct the conversion would be preferable to spending a huge amount of
time writing a hand-crafted solution.
>i told my future employer that i could, because i knew
of the COM scripting abilites that activePython had.
and i knew there was modules for PDF creation such as
reportlabs.
And the next time you are bragging in that way, couch your boasts in
conditional terms to avoid losing face should you happen to be wrong. A
lot will depend on the complexity of the Word documents.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

Oct 10 '06 #3

P: n/a
Il Tue, 10 Oct 2006 01:27:35 -0700, me**@awc.edu ha scritto:
is it possible to convert MSword docs into PDF format?
i told my future employer that i could, because i knew
of the COM scripting abilites that activePython had.
and i knew there was modules for PDF creation such as
reportlabs.
a lot depends on the availability of ms word itself on the platform you're
planning to do the work, if you want the result to be perfect. There're
several tools on Windows (some cheap, some freeware) like FreePDF o
pdffactory, which act like 'Virtual Printers' producing a PDF file instead;
you could try using Python to automate the printing process and getting the
PDF output instead. Or if you've got access to Adobe Acrobat as well, you
could automate the whole process via Acrobat (but it's untested, don't take
it as granted).

If you're doing this in Linux, you should consider something like Crossover
Office in order to run ms word and convert its output.

The openoffice.org based solution will surely work, but you'll heavily rely
on the conversion quality of that suite.

--
Alan Franzoni <al***************@gmail.com>
-
Togli .xyz dalla mia email per contattarmi.
Rremove .xyz from my address in order to contact me.
-
GPG Key Fingerprint:
5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E
-
Blog: http://laterradeglieroi.verdiperronchi.com
Oct 10 '06 #4

P: n/a
Steve Holden wrote:
If that *isn't* satisfactory then a modest investment in Adobe
Acrobat/Distiller plus the use of Python's scripting facilities to
direct the conversion would be preferable to spending a huge amount of
time writing a hand-crafted solution.
An alternative to Adobe Distiller (part of Acrobat) is PDFCreator

http://sourceforge.net/projects/pdfcreator/

which is free. This installs as a Windows printer (using GhostScript as
a backend to generate PDFs). It should be relatively straightforward to
use Python scripting to drive Word to "print" documents to the
PDFCreator pseudo-printer.
Oct 10 '06 #5

P: n/a
Andrew McLean wrote:
Steve Holden wrote:
>>If that *isn't* satisfactory then a modest investment in Adobe
Acrobat/Distiller plus the use of Python's scripting facilities to
direct the conversion would be preferable to spending a huge amount of
time writing a hand-crafted solution.


An alternative to Adobe Distiller (part of Acrobat) is PDFCreator

http://sourceforge.net/projects/pdfcreator/

which is free. This installs as a Windows printer (using GhostScript as
a backend to generate PDFs). It should be relatively straightforward to
use Python scripting to drive Word to "print" documents to the
PDFCreator pseudo-printer.
Nice one, thanks for that, I'd missed it.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

Oct 11 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.