/ Published in: Bash

This script enables the conversion of the HTML files available in the ePub format in only one PDF file
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/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"
Comments
