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

Free Support Forum - aspose.com

TextDevice methods are changing the text position

I was using Aspose.Pdf (9.4.0) with the method Absorber and when I started using the class textDevice the "footer" of the PDF has become returned in the string before the "header".

Why this is happening? Attached the file and image .

The following code snippet:

using (MemoryStream textStream = new MemoryStream())
textDevice = new TextDevice();
Aspose.Pdf.Text.TextOptions.TextExtractionOptions textExtOptions = new Aspose.Pdf.Text.TextOptions.TextExtractionOptions(Aspose.Pdf.Text.TextOptions.TextExtractionOptions.TextFormattingMode.Raw);
textDevice.ExtractionOptions = textExtOptions;
textDevice.Process(pdfDocument.Pages[page], textStream);
linha = Encoding.Unicode.GetString(textStream.ToArray());

textAbsorber = new TextAbsorber();
linha = textAbsorber.Text;


Hi Maria,

We are sorry for the inconvenience caused. While testing the scenario with the latest version of Aspose.Pdf for .NET 9.4.0, we have managed to reproduce the reported issue and logged it in our bug tracking system as PDFNEWNET-37258 for further investigation and resolution. We will notify you via this thread as soon as it is resolved.

Please feel free to contact us for any further assistance.

Best Regards,