File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,13 +9,13 @@ def extract(pdfs, opts)
99 extract_options opts
1010 [ pdfs ] . flatten . each do |pdf |
1111 pdf_name = File . basename ( pdf , File . extname ( pdf ) )
12- page_path = File . join ( @output , "#{ pdf_name } _%d.pdf" )
12+ page_path = ESCAPE [ File . join ( @output , "#{ pdf_name } " ) ] + " _%d.pdf"
1313 FileUtils . mkdir_p @output unless File . exists? ( @output )
1414
1515 cmd = if DEPENDENCIES [ :pdftailor ] # prefer pdftailor, but keep pdftk for backwards compatability
16- "pdftailor unstitch --output #{ ESCAPE [ page_path ] } #{ ESCAPE [ pdf ] } 2>&1"
16+ "pdftailor unstitch --output #{ page_path } #{ ESCAPE [ pdf ] } 2>&1"
1717 else
18- "pdftk #{ ESCAPE [ pdf ] } burst output #{ ESCAPE [ page_path ] } 2>&1"
18+ "pdftk #{ ESCAPE [ pdf ] } burst output #{ page_path } 2>&1"
1919 end
2020 result = `#{ cmd } ` . chomp
2121 FileUtils . rm ( 'doc_data.txt' ) if File . exists? ( 'doc_data.txt' )
@@ -33,4 +33,4 @@ def extract_options(options)
3333
3434 end
3535
36- end
36+ end
You can’t perform that action at this time.
0 commit comments