Scenario:
A Microsoft SQL 2008 Database with Report Services (version 10) generates a PDF report. The report is 1 page long, some basic text, nothing fancy.
Using .Net code, the PDF is opened and saved, the result is a blank PDF (blank as viewed in Adobe PDF Reader 8, i.e., the content has been lost when the PDF goes through PDFSharp).
If I change the document title, default zoom etc, these settings are saved, but the PDF is still blank.
The
same report, as generated per the previous version of SQL report services (version 9) runs through PDFSharp normally.
If I try to merge a PDF into the background of that report, like a PDF with a formatted header/footer using the code...
Code:
Dim gfx As XGraphics = XGraphics.FromPdfPage(FirstPage, XGraphicsPdfPageOptions.Prepend)
...an exception is encountered when the above line of code is called. (This error doesn't occour on v9 PDFs, only since v10 was introduced)...
Code:
PdfSharp.SharpZipLib.SharpZipBaseException: Header checksum illegal
at PdfSharp.SharpZipLib.Zip.Compression.Inflater.DecodeHeader() in PDFsharp\code\PdfSharp\PdfSharp.SharpZipLib\Zip\Compression\Inflater.cs:line 247
at PdfSharp.SharpZipLib.Zip.Compression.Inflater.Decode() in PDFsharp\code\PdfSharp\PdfSharp.SharpZipLib\Zip\Compression\Inflater.cs:line 427
at PdfSharp.SharpZipLib.Zip.Compression.Inflater.Inflate(Byte[] buf, Int32 offset, Int32 len) in PDFsharp\code\PdfSharp\PdfSharp.SharpZipLib\Zip\Compression\Inflater.cs:line 711
at PdfSharp.SharpZipLib.Zip.Compression.Streams.InflaterInputStream.Read(Byte[] b, Int32 off, Int32 len) in PDFsharp\code\PdfSharp\PdfSharp.SharpZipLib\Zip\Compression\Streams\InflaterInputStream.cs:line 409
Microsoft must have done something that upsets PDFSharp with their new rendering engine for PDFs, at this stage I am unsure which side the bug is in.
The PDF version of the report services pdf is 1.3 (Acrobat 4x).
Any suggestions?
Thanks.