Converting MSWord Docs to PDF

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • melv@awc.edu

    #1

    Converting MSWord Docs to PDF

    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


  • Sybren Stuvel

    #2
    Re: Converting MSWord Docs to PDF

    melv@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/

    Comment

    • Steve Holden

      #3
      Re: Converting MSWord Docs to PDF

      Sybren Stuvel wrote:
      melv@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

      Comment

      • Alan Franzoni

        #4
        Re: Converting MSWord Docs to PDF

        Il Tue, 10 Oct 2006 01:27:35 -0700, melv@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 <alan.franzoni. xyz@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

        Comment

        • Andrew McLean

          #5
          Re: Converting MSWord Docs to PDF

          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.

          Comment

          • Steve Holden

            #6
            Re: Converting MSWord Docs to PDF

            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

            Comment

            Working...