I’m trying to load a PDF document using GemBox.Pdf and the Load method like this:
var pdf = PdfDocument.Load(@"C:\Temp\test.pdf");
The problem is that I get an exception saying "Invalid character ‘R’ was read at index 0 in keyword “obj”. I can open the PDF document without any errors using my browser, Adobe Acrobat or FoxIt Reader.
Is it a bug somewhere or is GemBox.Pdf very strict compared to regular PDF readers?
I would love to send you the PDF file, but since it contains sensitive information I can’t do it without first removing a lot of text. I have tried to manually remove all the streams from within the PDF using Notepad++, but I have not had any success doing that while keeping the same error message. If you have any suggestion to how I can remove the text, please let me know.
Thank you, Stipo! I was now able to anonymize the PDF document while maintain the ‘R’ was read at index 0 in keyword “obj” exception. I will upload the PDF as a support ticket