View Single Post
Old 01-28-2017, 12:01 AM   #12
memeplex
Member
memeplex began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Jul 2013
Device: none
Here is another workaround as a handy bash function passing the output of ebook-convert to gs, it preserves the outline:

Code:
topdf() {
    local in=$1 tmp=${1%.*}-tmp.pdf out=${1%.*}.pdf
    ebook-convert "$in" "$tmp" --output-profile=ipad \
                               --change-justification=justify
    gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook \
       -dNOPAUSE -dBATCH -sOutputFile="$out" "$tmp"
    rm "$tmp"
}
Just run it as topdf <input-file>
memeplex is offline   Reply With Quote