Comments (4)
For the record, I used these parameters:
tabula -p 4-15 -c 47,150,256,310,375,431,504 -a 65.57142857142857,40.43571428571428,938.7642857142856,557.3571428571428 ~/Desktop/54013-1027504503-3.pdf
BTW, it uses the new --columns
/-c
parameter, that still lives in its own branch
from tabula-extractor.
Page 4 looks fine, but the rest are weird. I thought I had solved the problem a month or so ago where "words" wouldn't be split if they overlapped a vertical ruling. This'll have to take some more in-depth analysis, which I don't want to do write this second. :)
from tabula-extractor.
One problem is that PDFBox renders the page at some set width that may differ from a given PDF viewer's 100% zoom width of the PDF. So that'll throw off any vertical ruling locations that you give it. I've solved this for Dollars for Docs by letting the user specify the measured width of the page, which is turned into a "scale factor" -- i.e. page.width / measured_width -- to scale the user-provided vertical ruling locations into their location on the PDFBox page. This easy to implement, but I haven't implemented it yet here except in a very hacky, test-case kind of way.
I got better results by implementing that by changing line 65 in bin/tabula
to be
Tabula::Ruling.new(area[0], vr * (page.width / 820), 0, page.height)
and running
bundle exec tabula -p 7 -c 50,195,340,410,500,575,650,750 -a 65.57142857142857,40.43571428571428,938.7642857142856,557.3571428571428 54013-1027504503-3.pdf > output.xls
But we still have the problem on some pages. I'm not quite sure what the issue is exactly; I'll keep looking. (Perhaps we can work on this as we refactor, since the extractor, as we both know, needs that refactor really bad.)
from tabula-extractor.
Fixed in 90e2e87
Need to write test case. Leaving this issue open.
from tabula-extractor.
Related Issues (20)
- Area param explanation? HOT 3
- obtain one CSV file per detected table
- Extraction failed: (ArgumentError) comparison of Float with nil failed
- weird path to tabula
- Comments column not extracted HOT 3
- Field in form HOT 5
- Leading spaces in cells HOT 3
- use tabula-extractor in ruby app?
- Link to tabula-java in README points to wrong project HOT 2
- The output csv file using command line with the option 'spreadsheet'('lattice') is not well formated HOT 2
- problem with extracting text content HOT 1
- Helping tabula find the top of a table - column heading cribs? HOT 2
- jruby: no Ruby script found in input (LoadError)
- Tabula is not applicable on online pdf links?
- Ruby Initialization Failed HOT 1
- Warning message: `Failed to load class "org.slf4j.impl.StaticLoggerBinder".` HOT 3
- EOFException when installing with JRuby 1.5.6 HOT 4
- Refactor to use 'lattice' and 'stream' HOT 1
- Don't work extraction with multiple pages HOT 1
- Detected spreadsheet area too small HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tabula-extractor.