|
PDFsharp - moved to http://forum.pdfsharp.net/ Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
|
View previous topic :: View next topic |
Author |
Message |
kon_t
Joined: 28 May 2007 Posts: 1 Location: Australia
|
Posted: Mon May 28, 2007 9:33 pm Post subject: error opening pdfs: PdfReaderException - UNEXPECTED ERROR |
|
|
I have added a simple 'concatenate files' operation to an application, based on the code in the pdfsharp samples. Code appears to be working fine for many pdf docs.
However when attempting to open some dpf files [using PdfReader.Open(file, PdfDocumentOpenMode.Import)] a PdfSharp.Pdf.IO.PdfReaderException is thrown by the pdfsharp code.
Acrobat reader 8 opens the files without any problems.
As a test I copied some of the problem pdf files to the folder used by the concatenate documents pdfsharp sample & ran the sample. It stopped with the same exception. The error & stac trace from the sample app are included below. I did not change the saple source.k
Does anyone know about this error?
can anyone give me some clues as to how to go about fixing it?
I am new to pdf files, but am happy to work on a fix for the library (if required).
Thanks in advance
Kon Tantos
Error & stack trace from vs2005.
PdfSharp.Pdf.IO.PdfReaderException was unhandled
Message="UNEXPECTED ERROR while formatting message: System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure \"PdfSharp.Resources.Messages.resources\" was correctly embedded or linked into assembly \"PdfSharp\" at compile time, or that all the satellite assemblies required are loadable and fully signed.\r\n at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)\r\n at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)\r\n at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)\r\n at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)\r\n at System.Resources.ResourceManager.GetString(String name)\r\n at PdfSharp.PSSR.GetString(PSMsgID id) in D:\\_Development\\Research\\PDFSharp-0.9.653+MigraDocLite-1.2.1930\\PDFsharp\\PdfSharp\\PdfSharp\\PSSR.cs:line 108\r\n at PdfSharp.PSSR.Format(PSMsgID id, Object[] args) in D:\\_Development\\Research\\PDFSharp-0.9.653+MigraDocLite-1.2.1930\\PDFsharp\\PdfSharp\\PdfSharp\\PSSR.cs:line 72"
Source="PdfSharp"
StackTrace:
at PdfSharp.Pdf.IO.Parser.ReadSymbol(Symbol symbol) in D:\_Development\Research\PDFSharp-0.9.653+MigraDocLite-1.2.1930\PDFsharp\PdfSharp\PdfSharp.Pdf.IO\Parser.cs:line 538
at PdfSharp.Pdf.IO.Parser.ReadTrailer() in D:\_Development\Research\PDFSharp-0.9.653+MigraDocLite-1.2.1930\PDFsharp\PdfSharp\PdfSharp.Pdf.IO\Parser.cs:line 708
at PdfSharp.Pdf.IO.PdfReader.Open(Stream stream, String password, PdfDocumentOpenMode openmode, PdfPasswordProvider passwordProvider) in D:\_Development\Research\PDFSharp-0.9.653+MigraDocLite-1.2.1930\PDFsharp\PdfSharp\PdfSharp.Pdf.IO\PdfReader.cs:line 275
at PdfSharp.Pdf.IO.PdfReader.Open(String path, String password, PdfDocumentOpenMode openmode, PdfPasswordProvider provider) in D:\_Development\Research\PDFSharp-0.9.653+MigraDocLite-1.2.1930\PDFsharp\PdfSharp\PdfSharp.Pdf.IO\PdfReader.cs:line 200
at PdfSharp.Pdf.IO.PdfReader.Open(String path, PdfDocumentOpenMode openmode) in D:\_Development\Research\PDFSharp-0.9.653+MigraDocLite-1.2.1930\PDFsharp\PdfSharp\PdfSharp.Pdf.IO\PdfReader.cs:line 172
at ConcatenateDocuments.Program.Variant1() in D:\_Development\Research\PDFSharp-0.9.653+MigraDocLite-1.2.1930\PDFsharp\Samples C#\ConcatenateDocuments\Program.cs:line 87
at ConcatenateDocuments.Program.Main(String[] args) in D:\_Development\Research\PDFSharp-0.9.653+MigraDocLite-1.2.1930\PDFsharp\Samples C#\ConcatenateDocuments\Program.cs:line 49
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart() |
|
Back to top |
|
|
Stefan Lange
Joined: 12 Oct 2006 Posts: 47 Location: Cologne, Germany
|
Posted: Thu Jun 07, 2007 8:50 am Post subject: |
|
|
Hi,
the UNEXPECTED ERROR while formatting message... comes because a satellite assembly with the errors messages was not found. This may be a build error.
The actual error is in PdfSharp.Pdf.IO.Parser.ReadSymbol called from PdfSharp.Pdf.IO.Parser.ReadTrailer. I cannot guess what happens here. Please send me the PDF (using the e-mail address published in the source code) and I will take a look at it. |
|
Back to top |
|
|
acorn98
Joined: 28 Apr 2008 Posts: 1
|
Posted: Thu Oct 30, 2008 2:31 am Post subject: |
|
|
Hi Stefan,
Did you ever get to the bottom of this problem? I am getting the same error. |
|
Back to top |
|
|
|
|
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
|
|