Skip to main content
Windward

PDF Render Mode with Word

Overview

Beginning with version 15, Windward has developed a mode to use MS Word to render PDF output.

 

Microsoft does not document or reveal how it calculates measurements for PDF layout. We come very close with our native PDF output, but a perfect match is next to impossible without knowing more about how Microsoft meausures/creates PDF files in Word. However, we've provided a way to leverage MS Word's capability. By allowing MS Word to create the PDF output on your application server, you can get a pixel-perfect match like you are used to seeing when saving your Word documents to PDF files. So when a perfect match is critical, use this mode.

 

Warning: Microsoft recommends against calling MS Office this way and also recommends against isntalling MS Office on a server. We agree – MS Office is fragile and wasn't designed to be used in this manner. Also, the PDF output generated is much slower.

 

When can I use this feature?

You can currently use this feature only in Word.

 

  • Excel - PDF/A is not supported for Excel because the Excel call to SaveAs PDF is unsupported.
  • PowerPoint - PDF in PowerPoint from AutoTag does not work due to Microsoft limitations in PowerPoint. 

 

To Output via the Engines, OfficeToPdf.exe (shipped with Windward) is required. It also requires that you have Office installed on the application server running the Engine.

 

Finally, this mode can only be used for standard PDF. There is no PDF/A or PDF password support.

How to use this feature

Using the feature to Output via AutoTag

In the MS Ribbon, under the AutoTag Manager Tab, select the Options button. In the Standard tab, check 'Use Office for PDF Output' checkbox.

Note: In this case, AutoTag does not use the OfficeToPdf.exe.

 

Using the feature to Output via the Engines

Note: The code necessary to call MS Office on the server is already installed with the Engines.

 

To Output via the Engines, the OfficeToPdf.exe (shipped with the Engines) is required. MS Office is also required to be installed on the server running the Engine.

 

Warning: Microsoft recommends against calling MS Office this way and also recommends against isntalling MS Office on a server. We agree – MS Office is fragile and wasn't designed to be used in this manner. Also, the PDF output generated is much slower.

 

REQUIRED

Set output.builder to one of the following:

  • full.class.name – We use this class to generate PDF files. However, you may write your own class.
  • full_filename_dll;full.class.name - .NET Engine only – We use this class in the DLL to generate PDF files.

 

This can be set on a per report basis using ProcessReport.useExternalOutputBuilder() (Java Engine), or Report.UseExternalOutputBuilder (.NET Engine).

 

You can also set use.external.output.builder=on in the properties or config file. Then, provide useExternalOutputBuilder. The default for this option is set to On.

 

OPTIONAL

  • Optionally, set the OfficeToPdf.exe to the full path_filename for locating the OfficeToPdf.exe. If you do not set the full path_filename, the Engine will look in the folder that holds WindwardReports.jar (Java Engine) or WindwardReports.dll (.NET Engine).
    • OfficeToPdf.exe is Java Engine only. The .NET Engine has it built-in.

 

 

  • Was this article helpful?