Improvement - Anchor Point of pdfextractor.extractTextByRectangle does not match pdfcontenteditor.createPolygon

Hello,

there is some minor improvement could be synchronized somewhen soon. The anchor point of 2 methods seem not to be the same - where it is the top left corner for:

pdfextractor.extractTextInRectangle(scanRectangle);

it seems to be the bottom left corner for

pdfcontenteditor.createPolygon(lineInfo1, 1, scanRectangle, "");

I have attached the resulting file where the adress block should be marked near the top left corner wheras the bottom left corner is marked now for the same rectangle. I have added as well the default document with the mesurements to match a document with the standard DIN676 compilance - there you can find the same marked region on the second page

Greets

rennicke

Wheras the the lineInfo is created this way:

LineInfo lineInfo1 = new LineInfo();

lineInfo1.setLineColor(new Color(0, 255, 0));

lineInfo1.setLineWidth(5);

lineInfo1.setBorderStyle(1);

float[] verticeCoordinate ={ scanRectangle.x, scanRectangle.y, scanRectangle.x+scanRectangle.width, scanRectangle.y, scanRectangle.x+scanRectangle.width, scanRectangle.y+scanRectangle.height, scanRectangle.x, scanRectangle.y+scanRectangle.height };

int[] lineDashPattern ={ 2, 2 };

lineInfo1.setVerticeCoordinate(verticeCoordinate);

editor.createPolygon(lineInfo1, 1, scanRectangle, "");

Hi Helge,

I would like to share with you that all of the objects refer bottom-left corner as the origin point, however, as the text is extracted from top to bottom that is why the rectangle in that case is originated from top-left corner; that is by design. Can you please try to calculate the rectangle coordinates for the annotations accordingly?

We’re sorry for the inconvenience. If you have any further questions or concerns, please do let us know.
Regards,

Hello,

shure i can do this computation - if its intended this way. As it is not a bug you can close this case then.

Thanks for the hint.
rennicke