0

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.

David M
  • 43
  • 3
  • 10
  • What are the details of the layout conversion you require? Are you say switching A4 letter to A3 landscape? These sorts of details are essential to be able to help with suggestions. – Paul Jowett Aug 27 '17 at 04:04
  • I am going from TXT which I don't believe really has a size to a size that I don't believe it is a standard size. In order to get the layout correct on the output I needed to set the width to 1000 x 8000. I believe that size is in points. I can provide a sample of the source file if that would help. – David M Aug 28 '17 at 17:56
  • If you are going from txt to pdf, then the page sizing and layout will be somewhat arbitrary. If your doc is easy to read then the PDF version of it will be easy to read also. The downside to automating Word is that even Microsoft advise against it. LibreOffice and jWordConvert are possibly useful tools (jWordConvert is commercial). – Paul Jowett Nov 29 '17 at 00:26

1 Answers1

0

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.

Paul Jowett
  • 6,513
  • 2
  • 24
  • 19