You can generate pdfs with headless Chromium/Chrome pretty easily.
chromium-browser --headless --disable-gpu --print-to-pdf=output_file_name.pdf file:///path/to/your/html