We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Flatten() corrupts PDF?

Hi guys,
please, check attached PDF and following code:

var document = new Aspose.Pdf.Document(@"C:\temp\test.pdf");
document.Flatten();

foreach (var page in document.Pages)
{
        var textFragmentAbsorber = new Aspose.Pdf.Text.TextFragmentAbsorber();
        page.Accept(textFragmentAbsorber);  // -> exception thrown here
}

When flatten() is omitted, “page.Accept(textFragmentAbsorber)” works as expected.

Please, what could be wrong here?

Thank you and best regards!
Ondrej

test.pdf (334.4 KB)

@ondrej.hanak

A ticket with ID PDFNET-50430 has been created in our issue tracking system to further investigate the issue on our end. This thread has been linked with the issue so that you may be notified once the issue will be fixed.