SAP Knowledge Base Article - Public

1753955 - Text alignment different when exporting a report to PDF format from Crystal Reports

Symptom

  • Text alignment incorrect.
  • Text appears differently when exported to PDF.
  • White gap appear between the text and the object border when exported to PDF.
  • Text alignment is not maintained when a report is exported to PDF format from Crystal Reports.
        
          
  • Note: Images and data in this SAP Knowledge Base Article is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.

Environment

  • SAP Crystal Reports 2008
  • SAP Crystal Reports 2011
  • SAP Crystal Reports 2013

Reproducing the Issue

  1. In Crystal Reports, create a report off any data source.
  2. Insert a database field, or a text box that contains a lots of characters that displays on more than one line.
  3. Add a border around the database field or text box.
  4. Export the report to PDF format.
        
    Notice the alignment of the text is different than on the report.
    There is a large white gap between the border and the text.
     
    Gap Issue.png

Cause

  • The alignment is different, and a white gap appears because the font size shrinked.
  • When exporting to PDF Format, Crystal Reports shrinks the font size by 0.5 by default, in order to avoid truncating text.

Resolution

  • To retain the font size when exporting a report to PDF format from Crystal Reports, set the following registry keys, add the registry key: ForceLargerFonts, and set the value to one (1
       
    WARNING The following resolution involves editing the Microsoft Registry. Using the MS Registry Editor incorrectly can cause serious problems. Use the MS Registry Editor at your own risk. For more information see the SAP Knowledge Base Article 1323322
                 
    1. Open the Microsoft Registry Editor.
      ( In MS Windows, under the menu Start, select Run, and type: regedit )
            
    2. In the Microsoft Registry Editor, navigate to the path corresponding to the version of the product used:
                  
      • Crystal Reports 2008:
           
        • For 32bit version of MS Windows:
          HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 12.0\Crystal Reports\Export\PDF
                
        • For 64bit version of MS Windows:
          HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Business Objects\Suite 12.0\Crystal Reports\Export\PDF
                  
               
      • Crystal Reports 2011, 2013:
           
        • For 32bit version of MS Windows:
          HKEY_LOCAL_MACHINE\SOFTWARE\SAP Business Objects\Suite XI 4.0\Crystal Reports\Export\PDF
              
        • For 64bit version of MS Windows:
          HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Suite XI 4.0\Crystal Reports\Export\PDF 
                 
              
      • SAP BusinessObjects Business Intelligence Platform 4.0, 4.1, 4.2:**      
        • HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Suite XI 4.0\Crystal Reports\Export\PDF 
              
              
      • For Crystal Reports for Visual Studio:  
           
        • For 32bit version of MS Windows:
          HKEY_CURRENT_USER\Software\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Export\PDF
              
        • For 64bit version of MS Windows:
          HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Export\PDF
              
              
      • Important Note: The last part of the path may not exist. If it is the case, simply add the missing keys.
             
    3. Right click on the PDF key, and select: "New - DWORD Value"    
        
    4. Set the DWORD value to: ForceLargerFonts
        
    5. Set the value to: 1
         
    6. For the change to take effect, restart the application.       
         
      • For Crystal Reports:  Close and re-open Crystal Reports.
      • For SAP BusinessObjects Business Intelligence Platform:  Restart the Server Intelligent Agent (SIA)   

Keywords

spacing, truncate, , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem

Product

Crystal Reports 2008 V1 ; SAP Crystal Reports 2011 ; SAP Crystal Reports 2013