Reporting Services: PDF Renderer FAQ, part 2

This is a continuation of my work on FAQ for the PDF renderer.  A compiled version of these postings will will live at https://blogs.msdn.com/donovans/pages/reporting-services-pdf-renderer-faq.aspx.

 

File Size

 

Why are the PDFs exported from the Win/WebForms control so large?

Compression of the PDF document is not supported in Visual Studio 2005 WinForms or WebForms controls running in local mode.  When these controls run in server mode, this limitation is not present and the server will compress the PDF files.

The controls that will ship with Visual Studio 2008 will not have this limitation, however they will not be able to compress as well as PDF files generated on the server.  These controls will make use of the .NET System.IO.Compression classes which are not as efficient as the native compression libraries the server uses.

 

I'm not using the controls in local mode and my PDFs are still big.  Why?

If your PDF contains charts or PNG images, those images may be translated into bitmaps before being added to the PDF file.  Although this bitmap data will be recompressed, it will not be as space efficient as the original image.  To avoid this translation, use JPEG images or PNG files of color type 3 (PNG color type information can be found at https://en.wikipedia.org/wiki/PNG).

Prior to Reporting Services 2005 SP1, PNG images of additional color types were allowed.  Unfortunately, in order to fix a bug causing some PNGs to appear corrupted when rendered to PDF we needed to add the color type restriction.  Even more unfortunate is the fact that charts are sent to the PDF renderer as non-color type 3 PNGs of high DPI.  This is certainly a limitation we want to remove in the future but very unlikely it will be fixed in Reporting Services 2005.

Comments

  • Anonymous
    July 20, 2007
    A ReportViewer control is normally used to open a report definition file , process it and load it into

  • Anonymous
    July 27, 2007
    I read you with attention. I encountered problems with the size of pdf. I use now controls in serve mode. I still have problem with sub report that contains charts. Can you explain me how you replace charts by JPEG in report?

  • Anonymous
    July 27, 2007
    Without add-ons, there is not a way to change the format of the charts sent to the PDF renderer.  However, Dundas sells a chart product for Reporting Services that is able to render charts as JPEGs which should work around this issue. You can find more information about their product at http://www.dundas.com/Products/Chart/RS/Features/index.aspx.