0
votes

Getting the following exception when trying to open a PDF document with PdfSharp.PdfReader

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-gdi" at compile time, or that all the satellite assemblies required are loadable and fully signed.

pdfDocument1 = PdfReader.Open(stream1, PdfDocumentOpenMode.Import);
1
Are you using Version 1.50.4845-RC2a? If not, why not?I liked the old Stack Overflow

1 Answers

0
votes

Most likely an exception occurs while opening the PDF file. The code that tries to load the display text for the exception causes another exception and therefore you cannot see what is wrong with the PDF file.

I assume you are using an old version of PDFsharp. The current version 1.50.4845-RC2a should show the appropriate error message.