Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sometimes SpreadsheetExtractionAlgorithm ignores last row. #25

Open
esencu opened this issue Feb 20, 2023 · 0 comments
Open

Sometimes SpreadsheetExtractionAlgorithm ignores last row. #25

esencu opened this issue Feb 20, 2023 · 0 comments

Comments

@esencu
Copy link

esencu commented Feb 20, 2023

This code in Tabula.PageArea.GetArea method adds to PageArea instance horizontal ruling from right to left

rv.AddRuling(new Ruling(
new PdfPoint(rv.Right, rv.Bottom),
new PdfPoint(rv.Left, rv.Bottom)));

.
It leads to situation when Tabula.Ruling.SortObjectComparer order objects in invalid order.
As a result, the list of intersection is returned by Tabula.Ruling.FindIntersections is invalid and result of Tabula.Extractors.SpreadsheetExtractionAlgorithm.FindCells does not contains some cells that it should.

As a fix:
Fix Tabula.PageArea.GetArea method

rv.AddRuling(new Ruling(
    new PdfPoint(rv.Left, rv.Bottom),
    new PdfPoint(rv.Right, rv.Bottom)));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant