docsplit 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- data/docsplit.gemspec +1 -1
- data/lib/docsplit.rb +2 -2
- metadata +2 -2
data/docsplit.gemspec
CHANGED
data/lib/docsplit.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# The Docsplit module delegates to the Java PDF extractors.
|
2
2
|
module Docsplit
|
3
3
|
|
4
|
-
VERSION = '0.6.
|
4
|
+
VERSION = '0.6.2' # Keep in sync with gemspec.
|
5
5
|
|
6
6
|
ROOT = File.expand_path(File.dirname(__FILE__) + '/..')
|
7
7
|
|
@@ -68,7 +68,7 @@ module Docsplit
|
|
68
68
|
basename = File.basename(doc, ext)
|
69
69
|
escaped_doc, escaped_out, escaped_basename = [doc, out, basename].map(&ESCAPE)
|
70
70
|
|
71
|
-
if GM_FORMATS.include?(`file -b --mime #{doc}`.strip.split(/[:;]\s+/)[0])
|
71
|
+
if GM_FORMATS.include?(`file -b --mime #{ESCAPE[doc]]}`.strip.split(/[:;]\s+/)[0])
|
72
72
|
`gm convert #{escaped_doc} #{escaped_out}/#{escaped_basename}.pdf`
|
73
73
|
else
|
74
74
|
options = "-jar #{ROOT}/vendor/jodconverter/jodconverter-core-3.0-beta-4.jar -r #{ROOT}/vendor/conf/document-formats.js"
|