I need to convert DOC/TXT files to PDF in large batches

606 Views Asked by At

We are changing systems and the new system only outputs .DOC or .TXT files for reports. Several of the reports that come out need to be converted to PDF so they are available for our web users on a daily basis. Currently I am testing about 1500 of a single report and before the system is ready I will need to support at least 10 types of reports, each possibly have this 1500 or so convert.

So far I have not found a way to convert this many reports effectively. Part of the problem is that the reports must be converted to a specific size PDF for the them to be read easily. I have tested some software solutions but so far I have not been able find a solution.

I really like Batch Document Converter Pro. We have uses software from this company before and it worked very well for out needs. Whenever I try it though it gives the error

Problem with conversion: word to pdf, check word 2007 or greater is installed and the MS PDF Addon pack for office 2007

I have tried installing different versions of Office (including 2007) on the machine and installed the addon pack with no change.

1

There are 1 best solutions below

0
Paul Jowett On

One tool to try is Libre Office since:

  1. it can run on multiple platforms
  2. it can be driven from the command line or programmatic API
  3. you can use it manually to confirm whether it will do what you need before doing any scripting/programming
  4. it does pretty good conversions
  5. the docx files page format will transition naturally to the PDF
  6. the text files will be converted into a "normal" page layout

I would suggest you firstly install Libre Office, and open some of your documents by hand then export to PDF. If the results are good enough, then you can automate this to run in batches.

If the first step is promising, then the simplest automation is to use the command line. eg:

c:\Program Files\LibreOffice 5\program\soffice --convert-to pdf myDoc.docx

I hope that helps.