Loading PDF with Invalid whitespace

Hello,

We are currently experiencing the following error when attempting to use Document.Load to load a specific set of PDFs. I cannot send a PDF example as it contains sensitive information that cannot be shared, but I can confirm that the PDF loads in Adobe Acrobat, and has readable and highlight-able text.

Text cannot contain new line (’
‘), carriage return (’
‘) or tab (’ ') characters. If you want to break the text or insert a tab, insert SpecialCharacter instance with specific SpecialCharacterType to the parent’s InlineCollection.

Just looking for any suggestions on different ways to load this. We have tried loading the document with

using var stream = new MemoryStream(pdfContent, false);
var pdfDocument = DocumentModel.Load(stream);

and

using var stream = new MemoryStream(pdfContent, false);
var pdfDocument = DocumentModel.Load(stream, new PdfLoadOptions()
{
     LoadType = PdfLoadType.Logical
});

Both approaches failed

Hi Nav,

I’m afraid there is no other way to read a PDF with GemBox.Document. Please note that we will need to reproduce this issue to resolve it.

Alternatively, you can use GemBox.Pdf to read a PDF file.

Regards,
Mario