Skip to content

Commit c155d60

Browse files
cope with 'basic' as a synonym for the Stream extraction mode;
1 parent fcb0e10 commit c155d60

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/tabula_java_wrapper.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,12 @@ def Tabula.extract_tables(pdf_path, specs, options={})
4343
bea = Java::TechnologyTabulaExtractors.BasicExtractionAlgorithm.new
4444

4545
Enumerator.new do |y|
46+
puts pages.inspect
4647
extractor.extract(pages.map { |p| p.to_java(:int) }).each do |page|
4748
specs[page.getPageNumber].each do |spec|
48-
if ["spreadsheet", "original"].include?(spec['extraction_method'])
49+
if ["spreadsheet", "original", "basic"].include?(spec['extraction_method'])
4950
use_spreadsheet_extraction_method = spec['extraction_method'] == "spreadsheet"
50-
else
51+
else # guess
5152
use_spreadsheet_extraction_method = sea.isTabular(page)
5253
end
5354

0 commit comments

Comments
 (0)