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

Free Support Forum - aspose.com

Text Segments from Textfragment Absorber not in Correct Position

I am parsing the attached PDF, when looping through the text fragment collection and text segments, the text segments are giving an incorrect Y position.

The lines of text in the middle paragraphs on the left all have the same top value, thus overlap each other.

The contents on the right also do not give the correct Y position for the location on the document. they all appear to high. The X position is correct.

Thanks for your help with this issue.

Hi Meyrick,

Thanks for your inquiry. While using the latest version of Aspose.Pdf for NET 8.4.0, we've managed to reproduce this issue on our side and logged it in our bug tracking system as PDFNEWNET-35851 for further investigation and resolution.We will notify you via this thread as soon as it is resolved.

We are sorry for the inconvenience caused.

Best Regards,


Thanks for your patience.

We are pleased to inform you that earlier reported issue PDFNET-35851 has been resolved in latest release Aspose.Pdf for .NET 17.11. Now TextFragmentAbsorber gets text fragments with correct Position property. Please also take into account that PdfConverter returns image that represents document page CropBox. Therefore you should consider CropBox position to get correct drawing:

gr.Transform = new System.Drawing.Drawing2D.Matrix(scale, 0, 0, -scale,
    -scale * (float)pdf.Pages[1].CropBox.LLX,
    bmp.Height + scale * (float)pdf.Pages[1].CropBox.LLY);

Alternative way is using PngDevice with PageCoordinateType.MediaBox:

PngDevice device = new PngDevice(new Resolution(resolution));
device.CoordinateType = PageCoordinateType.MediaBox;
device.Process(pdf.Pages[1], ms);

In case of any further assistance, please feel free to let us know.