View previous topic :: View next topic |
Author |
Message |
Brian Pickles
Joined: 19 Feb 2007 Posts: 3
|
Posted: Mon Feb 19, 2007 3:18 pm Post subject: Exception opening PDF Document |
|
|
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 |
|
|
Brian Pickles
Joined: 19 Feb 2007 Posts: 3
|
Posted: Mon Feb 19, 2007 5:11 pm Post subject: Exception opening PDF Document |
|
|
Hi,
More info - problem seems to be when the Publisher document includes GIF's. _________________ Brian |
|
Back to top |
|
|
Thomas Hoevel
Joined: 16 Oct 2006 Posts: 387 Location: Cologne, Germany
|
Posted: Tue Feb 20, 2007 5:42 pm Post subject: |
|
|
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 |
|
|
Thomas Hoevel
Joined: 16 Oct 2006 Posts: 387 Location: Cologne, Germany
|
Posted: Wed Feb 28, 2007 4:27 pm Post subject: |
|
|
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 |
|
|
Thomas Hoevel
Joined: 16 Oct 2006 Posts: 387 Location: Cologne, Germany
|
Posted: Fri Mar 02, 2007 9:08 am Post subject: |
|
|
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 |
|
|
Brian Pickles
Joined: 19 Feb 2007 Posts: 3
|
Posted: Fri Mar 02, 2007 10:45 am Post subject: |
|
|
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 |
|
|
shabbir.hassanally
Joined: 29 Jul 2008 Posts: 1
|
Posted: Tue Jul 29, 2008 12:29 pm Post subject: Awesome support |
|
|
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 |
|
|
|