lib/ocr-file/image_engines/pdftoppm.rb in ocr-file-0.0.1 vs lib/ocr-file/image_engines/pdftoppm.rb in ocr-file-0.0.2

- old
+ new

@@ -11,10 +11,10 @@ # −cmyk Generate a CMYK PAM file (instead of an RGB PPM file). def images_from_pdf(pdf_path, save_path, filename: 'image', filetype: 'png', quality: 100, dpi: 300, verbose: true) print 'Generating screenshots of each PDF page ... ' if filetype == 'jpg' - `pdftoppm -jpeg -jpegopt quality=#{quality} -r #{dpi} #{pdf_path} #{save_path}/#{filename}` + `pdftoppm -jpeg -jpegopt quality=#{quality} -r #{dpi} "#{pdf_path}" "#{save_path}/#{filename}"` else `pdftoppm -#{filetype} -r #{dpi} #{pdf_path} #{save_path}/#{filename}` end puts 'Complete!'