docsplit 0.1.1 → 0.1.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.
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'docsplit'
3
- s.version = '0.1.1' # Keep version in sync with jammit.rb
4
- s.date = '2009-3-4'
3
+ s.version = '0.1.2' # Keep version in sync with jammit.rb
4
+ s.date = '2010-3-19'
5
5
 
6
6
  s.homepage = "http://documentcloud.github.com/docsplit/"
7
7
  s.summary = "Break Apart Documents into Images, Text, Pages and PDFs"
@@ -1,7 +1,7 @@
1
1
  # The Docsplit module delegates to the Java PDF extractors.
2
2
  module Docsplit
3
3
 
4
- VERSION = '0.1.1' # Keep in sync with gemspec.
4
+ VERSION = '0.1.2' # Keep in sync with gemspec.
5
5
 
6
6
  ROOT = File.expand_path(File.dirname(__FILE__) + '/..')
7
7
 
@@ -5,6 +5,7 @@ module Docsplit
5
5
  class ImageExtractor
6
6
 
7
7
  DENSITY_ARG = "-density 150"
8
+ MEMORY_ARGS = "-limit memory 128MiB -limit map 256MiB"
8
9
  DEFAULT_FORMAT = :png
9
10
 
10
11
  # Extract a list of PDFs as rasterized page images, according to the
@@ -22,7 +23,7 @@ module Docsplit
22
23
  directory = File.join(@output, subfolder)
23
24
  FileUtils.mkdir_p(directory) unless File.exists?(directory)
24
25
  out_file = File.join(directory, "#{basename}_%05d.#{format}")
25
- cmd = "gm convert +adjoin #{DENSITY_ARG} #{resize_arg(size)} #{quality_arg(format)} \"#{pdf}#{pages_arg}\" \"#{out_file}\" 2>&1"
26
+ cmd = "gm convert +adjoin #{MEMORY_ARGS} #{DENSITY_ARG} #{resize_arg(size)} #{quality_arg(format)} \"#{pdf}#{pages_arg}\" \"#{out_file}\" 2>&1"
26
27
  result = `#{cmd}`.chomp
27
28
  raise ExtractionFailed, result if $? != 0
28
29
  renumber_images(out_file, format)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docsplit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Ashkenas
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-03-04 00:00:00 -05:00
12
+ date: 2010-03-19 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15