How can I automate HTML-to-PDF conversions?

后端 未结 14 896
攒了一身酷
攒了一身酷 2020-12-23 19:29

I\'ve been using htmldoc for a while, but I\'ve run into some fairly serious limitations. I need the end solution to work on a Linux box. I\'ll be calling this library/utili

14条回答
  •  遥遥无期
    2020-12-23 20:28

    You can install the free Calibre, and use the ebook-convert command line utility it has, to convert many html documents into a single epub, or pdf.

    https://manual.calibre-ebook.com/generated/en/ebook-convert.html

    Idea comes from here

    I haven't used it, but this npm module wraps this process up like my following bash script, but probably better ;-)

    For me, on my mac, I use the following bash script to convert a local html website to a PDF:

    convert_html_to_pdf.sh

    function show_help()
    {
      ME=$(basename $0)
      IT=$(cat <

提交回复
热议问题