"Sequence contains no elements" when calling page.Content.GetText() method

Hello.
When I run the following code for one of my test documents, I get the System.InvalidOperationException: ‘Sequence contains no elements’.

            var pageText = page.Content.GetText(new PdfTextOptions
            {
                Order = PdfTextOrder.Reading,
                Whitespaces = PdfTextWhitespaces.Space | PdfTextWhitespaces.NewLine
            })?.ToString();

The document itself doesn’t appear to be corrupted; it loads correctly and can be viewed using various PDF viewers. Adobe Acrobat Reader does not suggest saving it after it is opened (which suggests there are no hidden problems that were automatically recovered).
The document consists of an image on the first page and some text on the second and third pages. The problem occurs when I try to get text from the first page.
I would probably expect GemBox.Pdf to return an empty string rather than throwing an exception. However, I might have missed something, so I would be glad to get your feedback on this.
Thank you.

P.S. I can share the document that causes this issue. Please let me know how I can hand it over to you.

Hi Yaroslav,

Please send the PDF file that causes the issue so we can reproduce it on our side and we will investigate.

You can submit support ticket using the following form: Contact Us - GemBox Support Center

Regards,
Stipo

Hi,

Please try again with this NuGet package:

Install-Package GemBox.Pdf -Version 2025.8.101

Note that this is a hidden (unlisted) version. To install it, you’ll need to run the above command on the NuGet Package Manager Console (Tools → NuGet Package Manager → Package Manager Console).

Does this solve your issue?

Regards,
Stipo

Hi Stipo,
Yes, it works well with the “2025.8.101” version, thank you!
Is it safe to use this (unlisted) version in production? Or better to wait for the publicly available one, which would include this fix?

Hi Yaroslav,

Please feel free to use the pre-released version, it goes through the same testing process as public versions.

Note that we do not make public releases on each build. Instead, we do it after a few fixes and/or enhancements (cumulative updates).

We do it monthly, see the release dates:

This version will be available in the next publicly released version as well.

Regards,
Mario