View previous topic :: View next topic |
Author |
Message |
ballinator
Joined: 11 Mar 2009 Posts: 4
|
Posted: Wed Mar 11, 2009 10:22 pm Post subject: PDF Sharp can't handle SQL Server 2008 PDF reports |
|
|
We use PDFSharp to concatenate multiple reporting services PDF reports into a single document using the AddPage method on the PDFSharp PDF Document. When we use SQL Server 2005 Reporting Services, this works fine. When we use SQL Server 2008 Reporting Services, the resultant concatenated PDF report shows just a blank page for each page we added. We know the Reporting Services 2008 PDF source is good because we can save it as it is to a database and later we can retrieve it and it displays fine. I see no comments on the PDF release notes about SQL Server 2008 Reporting services. In stepping through the code I noticed two things (and keep in mind, I'm creating the exact same report with the exact same data using the exact same code on the same exact workstation except that in one case I'm using 2005 Reporting Services and in the other I'm using 2008 Reporting Services):
1. The Reporting services 2005 PDF memory stream is about 97K in size while the Reporting Services 2008 PDF memory stream is 7.5K in size.
2. The PDFReader.cs class Open method throws an exception while processing a memory stream into a PdfDocument but this exception gets swallowed up by this method (An unexpected symbol) so you never see anything. This only happens with the 2008 PDF file. No exception occurs with the 2005 PDF file. _________________ Ballinator |
|
Back to top |
|
|
Thomas Hoevel
Joined: 16 Oct 2006 Posts: 387 Location: Cologne, Germany
|
Posted: Thu Mar 12, 2009 8:39 am Post subject: |
|
|
Hi!
This is a known problem.
Sorry, but we don't have time to fix it right now.
Can you set the PDF file version of the reports? AFAIK there is no problem with PDF files that are compatible with Acrobat Reader 5.0 (PDF 1.4). _________________ Regards
Thomas Hoevel
PDFsharp Team |
|
Back to top |
|
|
ballinator
Joined: 11 Mar 2009 Posts: 4
|
Posted: Tue Mar 17, 2009 8:25 pm Post subject: We cannot request a PDF version from reporting services |
|
|
We checked and SQL Server 2008 reporting services generates PDF version 1.3 files, which is the same PDF version that Sql Server 2005 reporting services generates. Unfortunately, there is no way to request a differing PDF report version when requesting a reporting services report.
Report Services 2008:
http://technet.microsoft.com/en-us/library/ms159713.aspx
Report Services 2005:
http://technet.microsoft.com/en-us/library/ms159713(SQL.90).aspx
Is there another way to create a "PDFDocument" object than just passing in the memory stream that reporting services generates? _________________ Ballinator |
|
Back to top |
|
|
ballinator
Joined: 11 Mar 2009 Posts: 4
|
Posted: Wed Mar 18, 2009 11:05 pm Post subject: |
|
|
We think we figured it out in that SSRS (Sql Server Reporting Services) 2008 compresses the PDF files while SSRS 2005 did not. Is this what is causing the problem? _________________ Ballinator |
|
Back to top |
|
|
Thomas Hoevel
Joined: 16 Oct 2006 Posts: 387 Location: Cologne, Germany
|
Posted: Thu Mar 19, 2009 8:03 am Post subject: |
|
|
That's not my area of expertise but AFAIK new PDF versions allow references where old PDF versions required direct data. Some of these references are not implemented in PDFsharp.
But maybe new PDF versions allow compressed streams where old PDF versions required uncompressed streams.
This is a known problem.
Sorry, but we don't have time to fix it right now. _________________ Regards
Thomas Hoevel
PDFsharp Team |
|
Back to top |
|
|
ballinator
Joined: 11 Mar 2009 Posts: 4
|
Posted: Thu Mar 19, 2009 3:13 pm Post subject: Found the way to disable PDF compression |
|
|
For the DeviceSettings parameter for the Render method on the ReportExecutionService object, pass this value:
theDeviceSettings = "<DeviceInfo><HumanReadablePDF>True</HumanReadablePDF></DeviceInfo>";
This disables PDF file compression for SSRS 2008. Then, PDFSharp is able to handle the resulting uncompressed PDF file. (Note: SSRS 2005 ignores this setting so it can be passed to both SSRS versions.) _________________ Ballinator |
|
Back to top |
|
|
|