Hi, thanks for this great PDF library. However, i get this exception, System.NullReferenceException was unhandled, when i reading it into my c# project for manipulation. Any help is appreciated!
This article on XsPDF.com is what are you looking for, check out: PDF Basic Library for .NET.
Answers
Have you checked your PDF? From my point of view, i think your PDF file is untypical in some way, maybe a buggy PDF file.
Actually, i have already checked it in some ways. I can open the PDF document in several acrobat readers, no error at all. So i guess it is not the problem of my PDF file. But i really miss something important.
One more thing for your investigation, this is the c# code i used in my project to get the PDF. PdfDocument inputDocument = PdfReader.Open(filename1, PdfDocumentOpenMode.Import);
Will it be good for my case if the cast to PdfReference to be null checked?
Certainly, doing pre-checking for null would be a bit better than not checking and getting an exception. However, this will not help to open the PDF file. To locate the problem, please send us a copy of your PDF file and we can do more investigation. Email: .