How Do I Use Microsoft Office to Generate PDF Output with Report Engine for RESTful?
Because of vagueness in the PDF specification, using Microsoft Office to generate PDF output from report templates rather than the Windward PDF renderer can sometimes improve the fidelity of the output.
To allow the flexibility of using Office to generate PDF output, Report Designer and the Report Engines have a toggle to turn on using the Office PDF renderer.
With Report Engine for RESTful, extra steps must be taken to configure IIS to access Microsoft Word.
To use this feature, Office must be installed on the server where the PDF output is generated, i.e. where your Report Engine application is installed.
The use.external.output.builder Property
To turn on the use Office for PDF output feature in Report Engine for RESTful, set the external.output.builder property in your web.config file:
<add key="use.external.output.builder" value = "on"/>
Configuring IIS to Access Microsoft Office
- In a command prompt, run 'DCOMCNFG'
- In the Component Services window, browse to 'Component Services' -> 'Computers' -> 'My Computer'
- Double click 'DCOM Config'
- Click ‘NO’ for all ‘DCOM Configuration Warning’ popup windows.
- Find 'Microsoft Word 97 - 2003 Document'
- If it isn't there, run 'mmc comexp.msc /32' in a command prompt and repeat steps 2 and 3
- Right click on 'Microsoft Word 97 - 2003 Document' and select 'Properties'
- In the 'General' tab, change the 'Authentication Level' to 'None'
- Open the 'Security' tab
- In all three sections (‘Launch and Activation Permissions’, ‘Access Permissions’, and ‘Configuration Permissions’), do the following:
- Toggle the radio button from 'Use Default' to 'Customize'
- Click on ‘Edit…’
- Click on ‘Add…’
- Enter ‘Everyone’
- Click ‘OK’
- Select all the available permissions for Everyone
- Click ‘OK’ to close the Permission window
- Open the ‘Identity’ tab
- Change the radio button from ‘The launching user’ to ‘The interactive user’
- Click "Apply'
- Click 'OK' in the 'Microsoft Word 97 - 2003 Document Properties' window to save your changes and close the window
- Open the ‘Properties’ of your C:\Windows\Temp directory
- Select the 'Security’ tab
- Select the ‘Edit...’ button
- Click the ‘Add...’ button
- Add the IIS user
- Give that user the ‘Modify’ permission
- Click ‘Apply’
- Select ‘OK’ to save your changes and close the window
- Select ‘OK’ again in the 'Temp Properties' window to save the changes and close the window