PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Assertion Failed: not implemented
https://forum.pdfsharp.net/viewtopic.php?f=3&t=1146
Page 1 of 1

Author:  prbpci0 [ Wed Apr 14, 2010 8:00 pm ]
Post subject:  Assertion Failed: not implemented

I hit an 'Assertion Failed: not implemented' exception trying to open a PDF file generated from VS2010 from an rdlc file using LocalReport.Render(). I attached the PDF file in question. I had downloaded PDFSharp 1.31 and recompiled with VS2010.

The file *looks* fine to me (using Adobe), but using the following code

Code:
            string filename = @"C:\test2.pdf";
            PdfDocument inputDocument =  PdfReader.Open(filename, PdfDocumentOpenMode.Import);


throws the exception.

Here's the stack trace:
    at Lexer.ScanNextToken() C:\Users\pete.STM\Clients\GRFirst\PdfSharp2010\PdfSharp.Pdf.IO\Lexer.cs(163)

    at Parser.ReadSymbol(Symbol symbol) C:\Users\pete.STM\Clients\GRFirst\PdfSharp2010\PdfSharp.Pdf.IO\Parser.cs(539)

    at Parser.ReadObject(PdfObject pdfObject, PdfObjectID objectID, Boolean includeReferences) C:\Users\pete.STM\Clients\GRFirst\PdfSharp2010\PdfSharp.Pdf.IO\Parser.cs(261)

    at PdfReader.Open(Stream stream, String password, PdfDocumentOpenMode openmode, PdfPasswordProvider passwordProvider) C:\Users\pete.STM\Clients\GRFirst\PdfSharp2010\PdfSharp.Pdf.IO\PdfReader.cs(341)

    at PdfReader.Open(String path, String password, PdfDocumentOpenMode openmode, PdfPasswordProvider provider) C:\Users\pete.STM\Clients\GRFirst\PdfSharp2010\PdfSharp.Pdf.IO\PdfReader.cs(205)

    at PdfReader.Open(String path, PdfDocumentOpenMode openmode) C:\Users\pete.STM\Clients\GRFirst\PdfSharp2010\PdfSharp.Pdf.IO\PdfReader.cs(177)

    at Form1.button1_Click(Object sender, EventArgs e) C:\Users\pete.STM\Test\PDFTest\PDFTest\Form1.cs(26)

Can anyone help?

Thanks a million.

Pete.

Attachments:
test2.pdf.zip [45.72 KiB]
Downloaded 663 times

Author:  Vogelwide [ Thu Aug 09, 2012 12:15 pm ]
Post subject:  Re: Assertion Failed: not implemented

Hello! I have the same problem with PDF files generated using Reporting Service 2008. The problematic character is '±'. It causes the assertion in Lexer.cs in line 163.
Of course it is possible to hack the library to eliminate this assertion but I don't know PDF format so much, so it would be a very dangerous step.
Any help would be appreciated.
Br, Vogelwide

Author:  Thomas Hoevel [ Thu Aug 09, 2012 2:38 pm ]
Post subject:  Re: Assertion Failed: not implemented

Can you tell the Reporting Service to create "HumanReadablePDF"?
See also:
viewtopic.php?p=1613#p1613
viewtopic.php?f=2&t=832

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/