SAP Knowledge Base Article - Public

1182391 - Large PDF file generated when exporting a report to PDF format from Crystal Reports

Symptom

  • Big PDF file.
  • Exporting a report to PDF format from Crystal Reports generates much larger PDF document than expected.
  • In the properties of the generated PDF document, it shows the same font as been embedded multiple times. 

Environment

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

Reproducing the Issue

  1. In Crystal Reports, create a report off any data source.
  2. Save the report, and take note of the Crystal Reports file size.
  3. Export the report to PDF format.
  4. When looking at the file size of the generated PDF document, it is much larger than the file size of Crystal Reports file.

Cause

  • PDF document file size will always be larger than Crystal Reports format file size because:
    • Crystal Reports stores the report structure, and the data, if the option to save the data is checked.
    • When the report is open in Crystal Reports, it will re-generate each page of the report based on the report structure, and the saved data stored.
    • Crystal Reports does not store any formatted pages in the report file, but in a PDF document, it stores all the pages, therefore it will always take more space than a report file stored in Crystal Reports format.
                  
  • If the generated PDF file size is much larger than expected, then it is also due to the use of custom encoding added to the PDF document when exporting that allows some text extractor (for example Blackberry) to extract text properly. Unfortunately this feature creates the possibility of generating additional font subsets. As each font subset has its own tables (cmap, os/2, ...), the PDF file size could increase.

Resolution

  • To avoid embedding extra font subset, and therefore reduce the PDF document size, add the registry key: UseCustomEncoding, and set the value to zero (0)
     

    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, 2016:
           
        • 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 
           
            
      • 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: UseCustomEncoding
         
    5. Set the value of UseCustomEncoding to: 0
             
    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

Crystal Reports, PDF, export, size, increase, sp4, crxf_pdf.dll , 1537854 , KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , Problem

Product

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