I ripped a lot of xhtml files from a crappy ebook reader online, how do combine these into a pdf?

  • irelephant [he/him]🍭OP
    link
    fedilink
    English
    12 months ago

    I made the script to rip them in bash. I know python, lua, js, bash and powershell, anything using these works.

    • @deegeese@sopuli.xyz
      link
      fedilink
      English
      32 months ago

      Surely you can figure out how to use existing libraries for this task, or is there something you’re stuck on?

    • Daniel Quinn
      link
      fedilink
      English
      32 months ago

      I’ve used pdfkit to considerable success. It has a few system-level dependencies, but the instructions are pretty straightforward:

      # apt-get install wkhtmltopdf
      $ pip install pdfkit
      
    • Cousin Mose
      link
      fedilink
      English
      1
      edit-2
      2 months ago

      In a production web app I use Gotenberg. It’s definitely overkill for the task at hand, but if you find yourself doing this often I would highly recommend it. It’s dead easy to convert HTML (and I imagine XHTML) to PDF.