File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ def extract(pdfs, opts)
10
10
[ pdfs ] . flatten . each do |pdf |
11
11
pdf_name = File . basename ( pdf , File . extname ( pdf ) )
12
12
page_path = ESCAPE [ File . join ( @output , "#{ pdf_name } " ) ] + "_%d.pdf"
13
- FileUtils . mkdir_p @output unless File . exists ?( @output )
14
-
13
+ FileUtils . mkdir_p @output unless File . exist ?( @output )
14
+
15
15
cmd = if DEPENDENCIES [ :pdftailor ] # prefer pdftailor, but keep pdftk for backwards compatability
16
16
"pdftailor unstitch --output #{ page_path } #{ ESCAPE [ pdf ] } 2>&1"
17
17
else
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ def initialize
28
28
# Extract text from a list of PDFs.
29
29
def extract ( pdfs , opts )
30
30
extract_options opts
31
- FileUtils . mkdir_p @output unless File . exists ?( @output )
31
+ FileUtils . mkdir_p @output unless File . exist ?( @output )
32
32
[ pdfs ] . flatten . each do |pdf |
33
33
@pdf_name = File . basename ( pdf , File . extname ( pdf ) )
34
34
pages = ( @pages == 'all' ) ? 1 ..Docsplit . extract_length ( pdf ) : @pages
You can’t perform that action at this time.
0 commit comments