pdf-extract 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/bin/s6.mask.pdf ADDED
Binary file
@@ -47,6 +47,9 @@ module PdfExtract
47
47
  y = body[:y] + (body[:height] * i * step)
48
48
  column_ranges << columns_at(y, body_regions)
49
49
  end
50
+
51
+ # Discard those with a coverage of 0.
52
+ column_ranges.reject! { |r| r.covered.zero? }
50
53
 
51
54
  # Discard those with more than x columns. They've probably hit a table.
52
55
  column_ranges.reject! { |r| r.count > pdf.settings[:max_column_count] }
data/lib/font_metrics.rb CHANGED
@@ -40,6 +40,9 @@ module PdfExtract
40
40
  @bbox = font.bbox
41
41
  @glyph_width_lookup = proc { |c| font.glyph_width c }
42
42
  end
43
+
44
+ @ascent = @bbox[3] if @ascent.zero?
45
+ @descent = @bbox[1] if @descent.zero?
43
46
  end
44
47
 
45
48
  def glyph_width c
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 1
9
- version: 0.0.1
8
+ - 2
9
+ version: 0.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Karl Jonathan Ward
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-10-21 00:00:00 +01:00
17
+ date: 2011-10-24 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -140,6 +140,7 @@ files:
140
140
  - bin/one-column.mask.pdf
141
141
  - bin/pdf-extract
142
142
  - bin/s002040050107_Arch_Toxicol_1994_68_8.mask.pdf
143
+ - bin/s6.mask.pdf
143
144
  - bin/some3.mask.pdf
144
145
  - bin/some5.mask.pdf
145
146
  - bin/some6.mask.pdf