-
Notifications
You must be signed in to change notification settings - Fork 433
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
tabula-java allow specifying multiple areas #213
tabula-java allow specifying multiple areas #213
Conversation
…#1942) - Allow multiple occurrences of -a parameter - Allow -a parameter to accept % values as well as absolute values - Add test cases - Add test files
return getArea(area, mode); | ||
} | ||
|
||
public Page getArea(Rectangle area, int mode) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather leave this method as it was, and make the relative→absolute conversion in CommandLineApp
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The orginal method is there as is... I didn't modify it. I simply added another method.
Additionally based on the comment at the top of the file...
// TODO: this class should probably be called "PageArea" or something like that
it seemed to me that Page.java is the place where all area calculations should be housed and hence I decided the add that method.
I can anyways move the calculations out of Page.java... but just want a quick confirmation from you again if possible please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about that. I misread and thought you modified the original method. My bad.
In any case, I still feel that the conversion belongs in CommandLineApp
.
if (pageArea != null) { | ||
page = page.getArea(pageArea); | ||
if (pageAreas != null) { | ||
for (Pair<Integer, Rectangle> areaPair : pageAreas) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean here. You have access to the Page
objects, so you can do the conversion at this point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree... tried to explain the thinking behind why I put the calculations the Page.java as opposed to CommandLineApp.java file... Please do confirm once more before I send the updated code.
PS: I apologize for asking to reconfirm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explanation is under the other review comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No apologies needed!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes done and committed.
This is awesome, @asheeshrana — Thanks a lot! The tests are very much appreciated :) I've requested a couple minor changes, let me know what you think. |
- Moved the constants out of page class
Merged! Thanks a lot, @asheeshrana ! |
1942-update-tabula-java-for-muti-column-pdf (PolicyReporter/requests/#1942)
Misc Notes for reviewer:
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)