We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents bd35135 + 494d140 commit 6089122Copy full SHA for 6089122
lib/docsplit/image_extractor.rb
@@ -42,7 +42,7 @@ def convert(pdf, size, format, previous=nil)
42
else
43
page_list(pages).each do |page|
44
out_file = ESCAPE[File.join(directory, "#{basename}_#{page}.#{format}")]
45
- cmd = "MAGICK_TMPDIR=#{tempdir} OMP_NUM_THREADS=2 gm convert +adjoin #{common} #{escaped_pdf}[#{page - 1}] #{out_file} 2>&1".chomp
+ cmd = "MAGICK_TMPDIR=#{tempdir} OMP_NUM_THREADS=2 gm convert +adjoin -define pdf:use-cropbox=true #{common} #{escaped_pdf}[#{page - 1}] #{out_file} 2>&1".chomp
46
result = `#{cmd}`.chomp
47
raise ExtractionFailed, result if $? != 0
48
end
0 commit comments