Advertisement
opexxx

Convert ePub to PDF in Linux command line.sh

Apr 7th, 2014
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.32 KB | None | 0 0
  1.     #!/bin/bash
  2.     INPUT_DIR=
  3.     OUTPUT_DIR=
  4.     OUTPUT_FILE=merge.pdf
  5.     #INPUT DIR must contain the unzipped ebook file
  6.     #unzip file.epub
  7.     for i in $( ls $INPUT_DIR ); do
  8.     echo $i
  9.     wkhtmltopdf "$INPUT_DIR/$i" "$OUTPUT_DIR/$i".pdf
  10.     done
  11.      
  12.     pdftk `ls "$OUTPUT_DIR"` cat output "$OUTPUT_FILE"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement