Symptoms
When you use Report Commander to export a report to PDF format, the font size is slightly reduced compared to the size that appears in the Crystal Reports designer and in printed output.
Cause
This is not a problem with Report Commander but is a documented issue with Crystal Reports. Because Report Commander uses the Crystal Reports runtime components to produce the export, the PDF produced by Report Commander will match the PDF created by exporting directly from Crystal Reports.
Resolution
It is possible to force Crystal Reports and therefore Report Commander to use a larger font by setting a Registry option.
Run the Registry Editor and navigate to the appropriate key based on your operating system:
- On 32-bit platforms: "HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 12.0\Crystal Reports"
- On 64-bit platforms: "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Business Objects\Suite 12.0\Crystal Reports"
Under this key, create the subkeys "\Export\Pdf". The full path of the new key will be
- On 32-bit platforms: "HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 12.0\Crystal Reports\Export\Pdf"
- On 64-bit platforms: "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Business Objects\Suite 12.0\Crystal Reports\Export\Pdf"
Under this key, create a new DWORD value named "ForceLargerFonts" and set it to "1".
Add the "ForceLargerFonts" value under the user key as well:
- On 32-bit platforms, put the value under key "HKEY_CURRENT_USER\Software\Business Objects\Suite 12.0\Crystal Reports\Export\Pdf"
- On 64-bit platforms, put the value under key "HKEY_CURRENT_USER\Software\Wow6432Node\Business Objects\Suite 12.0\Crystal Reports\Export\Pdf"
Note: If you will be running Report Commander from different user accounts (e.g., running it from a scheduler that uses a different account), you will need to set the Registry option under the user key for each user.
Crystal Reports and Report Commander should now use a larger font when exporting.
Side Effects
In some cases this change may result in truncation of text. In this case you can apply the changes discussed in the following technical note from SAP:
ADAPT00940675
Description:
When exporting a report to PDF format, the font size is reduced by a small factor in the export. To address this, users can set the "ForceLargerFonts" registry key to maintain the correct font size in the export. However, exports with this option turned on can occasionally have truncated data along the right page margin. This truncation occurs due to a mismatch of how character widths are calculated between PDF and Microsoft Windows.
New Behavior:
The PDF export engine has been modified to incorporate a new algorithm that positions characters precisely to prevent truncation from ocurring while maintaining the correct font size. This algorithm is activated and controlled by two new registry keys. These keys are:
[HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 12.0\Crystal Reports\Export\Pdf]
"UsePrecisePositioningForText"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 12.0\Crystal Reports\Export\Pdf]
"TruncationAdjustment"=dword:00000002
The "UsePrecisePositioningForText" key turns on the new functionality when it is set to 1. When this functionality is activated, the "ForceLargerFonts" key is ignored. The "TruncationAdjustment" key controls a width calculation rounding function in the new algorithm and accepts values between 0 and 10 inclusively. The default value of 2 has been tested to sufficiently eliminate most truncation issues. If truncation is still observed, this value can be increased for added granularity.
Known Limitations:
When the "UsePrecisePositioningForText" key is turned on, there are several side-effects. Exporting to PDF may take slightly longer, but no more than 10% longer. The exported PDF document will increase in size over the standard outputand Crystal Reports will consume more GDI resources during the export.