Return to Snippet

Revision: 63283
at April 22, 2013 23:17 by chema_ar


Initial Code
#!/bin/bash
INPUT_DIR=
OUTPUT_DIR=
OUTPUT_FILE=merge.pdf
#INPUT DIR must contain the unzipped ebook file
#unzip file.epub
for i in $( ls $INPUT_DIR ); do
   echo $i
   wkhtmltopdf "$INPUT_DIR/$i" "$OUTPUT_DIR/$i".pdf
done

pdftk `ls "$OUTPUT_DIR"` cat output "$OUTPUT_FILE"

Initial URL


Initial Description
This script enables the conversion of the HTML files available in the ePub format in only one  PDF file

Initial Title
Convert ePub to PDF in Linux command line

Initial Tags
Bash

Initial Language
Bash