jesparza/peepdf

Is there any way to have a file name of PDF on interactive mode?

swawibe opened this issue · 1 comments

What I want is I need to process batch of PDF files and just save the Java Scripts of each PDF files. For that thing I need to have a file name of PDF file. Like I am using -s (command option in PDF file)

peepdf -fl -s command pdffile.pdf

in command file I have:

extract js > abc.js

but if there is a pdf_file_name variable in interactive mode then I could have used $filename.js instead of abc.js

Hi @swawibe,

What you want to do can be done without such a variable. As you are probably using a bash script or something similar to execute peepdf with all the files, I would do something like:

for file in ls $directory; do
peepdf -fil -C "extract js" $file > "$file.js"
done