PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Aug 16, 2018 8:03 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Wed Mar 11, 2009 10:22 pm 
Offline

Joined: Wed Mar 11, 2009 9:54 pm
Posts: 4
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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Mar 12, 2009 8:39 am 
Offline
empira Employee
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 2847
Location: Cologne, Germany
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


Top
 Profile  
Reply with quote  
PostPosted: Tue Mar 17, 2009 8:25 pm 
Offline

Joined: Wed Mar 11, 2009 9:54 pm
Posts: 4
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/libr ... 59713.aspx

Report Services 2005:
http://technet.microsoft.com/en-us/libr ... 713(SQL.90).aspx

Is there another way to create a "PDFDocument" object than just passing in the memory stream that reporting services generates?

_________________
Ballinator


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Mar 18, 2009 11:05 pm 
Offline

Joined: Wed Mar 11, 2009 9:54 pm
Posts: 4
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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Mar 19, 2009 8:03 am 
Offline
empira Employee
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 2847
Location: Cologne, Germany
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


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 19, 2009 3:13 pm 
Offline

Joined: Wed Mar 11, 2009 9:54 pm
Posts: 4
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


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 20, 2009 6:36 pm 
Offline

Joined: Thu Aug 20, 2009 6:33 pm
Posts: 2
THANK YOU for the devicesettings information. That totally worked!

Now... for the problem :( Apparently this setting has affected the reporting services ability to process "curly" quotes and apostrophes.

I've made a very detailed post on the ASP.NET forums about it, hopefully someone has time to take a look... I think they may be stumped over there :) I've referenced this forum in my ASP.NET post.

http://forums.asp.net/p/1460993/3357385.aspx

Thank you everyone for your time.

-Robert


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 31, 2009 4:56 am 
Offline

Joined: Thu Aug 20, 2009 6:33 pm
Posts: 2
Any word on when we can merge SSRS 2008 PDFs possibly without using the deviceSettings parameter? (this causes reports to render incorrectly.)


Top
 Profile  
Reply with quote  
PostPosted: Fri May 14, 2010 3:15 pm 
Offline

Joined: Fri May 14, 2010 3:12 pm
Posts: 2
Does anyone have an update to this issue? It would definitely be nice to be able to combine compressed files.


Top
 Profile  
Reply with quote  
PostPosted: Mon May 17, 2010 7:26 am 
Offline
empira Employee
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 2847
Location: Cologne, Germany
Maybe this post can help:
viewtopic.php?p=3138#p3138

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Mon May 17, 2010 4:24 pm 
Offline

Joined: Fri May 14, 2010 3:12 pm
Posts: 2
thanks Thomas. I'll give that a shot.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group