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

Why use both -g and -a flags? #21

Closed
SergioGutTal opened this issue Mar 30, 2017 · 2 comments
Closed

Why use both -g and -a flags? #21

SergioGutTal opened this issue Mar 30, 2017 · 2 comments

Comments

@SergioGutTal
Copy link

Why use both -g and -a flags in options for extracting specific area? Isn't -g overriding the -a flag? You mention that it does not work without the -r option. I just tried without -r and -g and it works good.

java -jar ./tabula/tabula-0.9.1-jar-with-dependencies.jar -g -r -a "337.29,226.49,472.85,384.91" table.pdf

@chezou
Copy link
Owner

chezou commented Mar 31, 2017

I didn't find the evidence which -g overrides -a, but it overrides -r.
https://github.com/tabulapdf/tabula-java/blob/master/src/main/java/technology/tabula/CommandLineApp.java#L224

Why don't you PR document fixing? ;)

@chezou
Copy link
Owner

chezou commented Apr 18, 2017

As my further investigation, I understand what tabula-java's current implementation is around -a.

In short, the option around area will be considered as following order (left is strong):
-r = -l > -g > -a

  1. with -r/--spreadsheet or -l/--lattice option
    It works as SPREADSHEET mode and ignores both -g and -a.

  2. with -g/--guess and -a/--area option
    It works as BASIC mode. In that mode, after setting an area, it will be overriden by guess mode.

  3. with only -a option
    It works as BASIC mode and area option will not be overridden.

Anyway, I think it depends on the tabula-java's implementation, but I will fix my document.

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

2 participants