irelephant [he/him]🍭@lemm.ee to Piracy: ꜱᴀɪʟ ᴛʜᴇ ʜɪɢʜ ꜱᴇᴀꜱ@lemmy.dbzer0.comEnglish · 3 months agoHow do i turn a collection of xhtml files into a pdf?message-squaremessage-square7linkfedilinkarrow-up10arrow-down10file-text
arrow-up10arrow-down1message-squareHow do i turn a collection of xhtml files into a pdf?irelephant [he/him]🍭@lemm.ee to Piracy: ꜱᴀɪʟ ᴛʜᴇ ʜɪɢʜ ꜱᴇᴀꜱ@lemmy.dbzer0.comEnglish · 3 months agomessage-square7linkfedilinkfile-text
minus-squareirelephant [he/him]🍭@lemm.eeOPlinkfedilinkEnglisharrow-up0·3 months agoI made the script to rip them in bash. I know python, lua, js, bash and powershell, anything using these works.
minus-squareCousin Mose@lemmy.hogru.chlinkfedilinkEnglisharrow-up1·edit-23 months agoIn 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.
minus-squaredeegeese@sopuli.xyzlinkfedilinkEnglisharrow-up0·3 months agoSurely you can figure out how to use existing libraries for this task, or is there something you’re stuck on?
minus-squareirelephant [he/him]🍭@lemm.eeOPlinkfedilinkEnglisharrow-up0·3 months agoCan’t really find many good ones. Google isn’t returning much, just pdfs about python libraries and the odd abandoned github repo
minus-squaredeegeese@sopuli.xyzlinkfedilinkEnglisharrow-up0·3 months agoI’d start with wkhtmltopdf/pdfkit
minus-squareirelephant [he/him]🍭@lemm.eeOPlinkfedilinkEnglisharrow-up1·17 hours agoJust coming back to this a bit later, wkhtmltopdf is abandoned, is there any alternatives? It works fine for now, but it may not in future.
I made the script to rip them in bash. I know python, lua, js, bash and powershell, anything using these works.
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.
Surely you can figure out how to use existing libraries for this task, or is there something you’re stuck on?
Can’t really find many good ones. Google isn’t returning much, just pdfs about python libraries and the odd abandoned github repo
I’d start with wkhtmltopdf/pdfkit
Just coming back to this a bit later, wkhtmltopdf is abandoned, is there any alternatives? It works fine for now, but it may not in future.