Use this command to convert html to pdf:
google-chrome-stable --headless --print-to-pdf-no-header --disable-gpu --print-to-pdf --run-all-compositor-stages-before-