PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index PDFsharp - moved to http://forum.pdfsharp.net/
Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Exception opening PDF Document

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Bug Reports - moved to http://forum.pdfsharp.net/
View previous topic :: View next topic  
Author Message
Brian Pickles



Joined: 19 Feb 2007
Posts: 3

PostPosted: Mon Feb 19, 2007 3:18 pm    Post subject: Exception opening PDF Document Reply with quote

Hi,

Your software is impressive and easy to use. It has been working well.

Unfortunately I am now getting a 'Not implemented; unknown escape character.' exception.

at Lexer.ScanLiteralString()
at Lexer.ScanNextToken()
at Parser.ScanNextToken()
at Parser.ParseObject(Symbol Stop)
at Parser.ReadArray(PdfArray array, Boolean includeReference)
at Parser.ReadObject(PdfObject pdfObject, OdfObjectID objectID, Boolean includeReference)
at PdfReader.Open(Stream stream, String password, PdfDocumentOpenMode openmode, PdfPasswordProvider passwordProvider)
...........

The PDF file can be a single page or multiple pages. All the PDF files that cause this problem are created on different XP PRO SP2 (32bit edition) machines by printing from Microsoft Publisher 2000 using CutePDF Writer 2.7.

I can send you a single page PDF file that causes the problem if it helps.

Interestingly, the PDF file can be processed by PDFSharp if it is created on XP (64bit edition) by printing the same Publisher file using Microsoft Publisher 2003 with the same version of CutePDF Writer - 2.7.

All the PDF files that cause an exception in PDFSharp can be opened successfully in Adobe Reader 8.

Don't know if this is a bug in PDFSharp or CutePDF and I do not know enough about the PDF format to investigate further.

Is there any chance this can be fixed in PDFSharp, if not can you provide further information so that I can talk to Cute PDF.

Many thanks for any help you can provide.

Brian
_________________
Brian
Back to top
View user's profile Send private message
Brian Pickles



Joined: 19 Feb 2007
Posts: 3

PostPosted: Mon Feb 19, 2007 5:11 pm    Post subject: Exception opening PDF Document Reply with quote

Hi,

More info - problem seems to be when the Publisher document includes GIF's.
_________________
Brian
Back to top
View user's profile Send private message
Thomas Hoevel



Joined: 16 Oct 2006
Posts: 387
Location: Cologne, Germany

PostPosted: Tue Feb 20, 2007 5:42 pm    Post subject: Reply with quote

Do you get an exception or an assertion?
Assertions only occur with debug builds.

I'm not sure if we fixed this with current internal builds of PDFsharp.

If you send me a file via PM or publish the download location here, I will test it with a current build.
_________________
Regards
Thomas Hoevel
PDFsharp Team
Back to top
View user's profile Send private message Visit poster's website
Thomas Hoevel



Joined: 16 Oct 2006
Posts: 387
Location: Cologne, Germany

PostPosted: Wed Feb 28, 2007 4:27 pm    Post subject: Reply with quote

I can replicate the assertion (it's not an exception).
Our experts will have to take a look at that.
Should be fixed with the next release.
_________________
Regards
Thomas Hoevel
PDFsharp Team
Back to top
View user's profile Send private message Visit poster's website
Thomas Hoevel



Joined: 16 Oct 2006
Posts: 387
Location: Cologne, Germany

PostPosted: Fri Mar 02, 2007 9:08 am    Post subject: Reply with quote

Hi!
We have fixed this bug.

Here's the solution for lexer.cs (line 543):
Code:
                  default:
                    if (char.IsDigit(ch))
                    {
#if true
                      // Octal character code
                      int n = ch - '0';
                      if (Char.IsDigit(this.nextChar))
                      {
                        n = n * 8 + ScanNextChar() - '0';
                        if (Char.IsDigit(this.nextChar))
                          n = n * 8 + ScanNextChar() - '0';
                      }
                      ch = (char)n;
#else
                      //TODO
                      Debug.Assert(false, "Not implemented; unknown escape character.");
#endif
                    }
                    break;


Will be fixed in the next release (which is not scheduled yet).
Thank you, Brian, for your PDF file.
_________________
Regards
Thomas Hoevel
PDFsharp Team
Back to top
View user's profile Send private message Visit poster's website
Brian Pickles



Joined: 19 Feb 2007
Posts: 3

PostPosted: Fri Mar 02, 2007 10:45 am    Post subject: Reply with quote

Have added your patch and we can now process the PDF file which had the error.

That's great support. Thank you very much. It is much appreciated.
_________________
Brian
Back to top
View user's profile Send private message
shabbir.hassanally



Joined: 29 Jul 2008
Posts: 1

PostPosted: Tue Jul 29, 2008 12:29 pm    Post subject: Awesome support Reply with quote

Thanks for this; this was creating a strnage problem with our application; now with the fix all is well.

Also - kudos to the PDFSharp team - you've created something that is totally awesome.

Congratulations!

Warm Regards,

Shabbir
_________________
---
Doxmart Limited
www.doxmart.com
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Bug Reports - moved to http://forum.pdfsharp.net/ All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own YouTube Clone

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com