1

So I have put together an implementation of Documents4J using it's standalone executable server jar on one dedicated system with MS Word, and I call it with a web service using the client jars that they also provide. It seems to be working as expected.

The problem is that the client is noticing kerning in the final PDF product. It is commonplace when using an assortment of fonts...uneven spacing between letters. This kind of keen observation was something that our development staff did not notice at first glance....we just noticed that the PDFs now looked much better from our old implementations using word2pdf open source APIs that did not involve MS Word. This issue is duplicated when just opening Word and using "Save As..." and saving as PDF. In other words, this is an MS Word issue at heart.

However, when the Adobe Plugin is present in MS Word, and you use "Export" or "Print", they get the desired product.

Is there any way to either configure the RemoteServer or the Builder to use this alternate method of conversion within Documents4J?

tofertek
  • 11
  • 2

1 Answers1

0

Effectively, documents4j wraps a VBS script that triggers MS Office APIs. The script of the MS Word converter already uses exporting for PDF/A generation:

wordDocument.ExportAsFixedFormat outputFile, _
                                       WdExportFormatPDF, _
                                       False, _
                                       , , , , , , , , , , _
                                       True

but not for standard PDFs where the (faster) save-as-PDF function is used. In order to use the plugin, you would probably need the export function as well.

Have you tried PDF/A generation to see if this improves quality? In this case, you would need to change the last True of the call to a False for disabling PDF/A if you want to avoid the latter.

Rafael Winterhalter
  • 42,759
  • 13
  • 108
  • 192