PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Mar 28, 2024 12:29 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Wed Apr 14, 2010 8:00 pm 
Offline

Joined: Wed Apr 14, 2010 7:34 pm
Posts: 1
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 642 times
Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 09, 2012 12:15 pm 
Offline

Joined: Thu Aug 09, 2012 12:05 pm
Posts: 1
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


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 09, 2012 2:38 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3095
Location: Cologne, Germany
Can you tell the Reporting Service to create "HumanReadablePDF"?
See also:
viewtopic.php?p=1613#p1613
viewtopic.php?f=2&t=832

_________________
Regards
Thomas Hoevel
PDFsharp Team


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 47 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