Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Comments on Creating PDF from HTML on Debian Bookworm; tools?
Post
Creating PDF from HTML on Debian Bookworm; tools?
I am on a Debian Bookworm Docker image. My Rails6 project needs to convert HTML files to PDF. I used to do this with wkhtmltopdf, but wkhtmltopdf has not been supported for a long time now, and I want to update. I have tried using headless Chrome, but this is not a solution since it (a) contains bugs that cause parts of the HTML to be omitted, and there are one-page HTML files that even cause headless Chrome to outright crash; and (b) it's a very, very wonky installation. Right now I can't install headless Chrome on Bookworm because it can't find libasound2:amd64.
What else can I do? I tried Pandoc, but it uses an intermediate library for generating PDFs which I also find pretty wonky... pdfroff doesn't work at all and do I really need to install LaTeX?
I've been requesting my client to use a service provider such as nutrient.io, but as I generate files with confidential data, uploading our HTML files to an unknown destination isn't really something we want either.

2 comment threads