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

    • sirpuppy@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      2
      ·
      8 hours ago

      came here to say calibre! it works and the converting is super simple. takes a little while for pdf files since its a big file but it works

  • deegeese@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    2
    ·
    19 hours ago

    There are a ton of options depending on your tech level.

    How are you with basic Python scripts?

    • Irelephant@lemm.eeOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      19 hours 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
        arrow-up
        3
        ·
        18 hours ago

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

        • Irelephant@lemm.eeOP
          link
          fedilink
          English
          arrow-up
          2
          ·
          15 hours ago

          Can’t really find many good ones. Google isn’t returning much, just pdfs about python libraries and the odd abandoned github repo

      • Daniel Quinn@lemmy.ca
        link
        fedilink
        English
        arrow-up
        1
        ·
        17 hours 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
        
      • undefined@lemmy.hogru.ch
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        18 hours 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.

  • Moonrise2473@feddit.it
    link
    fedilink
    English
    arrow-up
    1
    ·
    19 hours ago

    If when opened with a browser they have the right stylesheet, you can pirate m0nkrus’ acrobat pro, then select all => right click => convert to pdf