Quickest in-house HTML to PDF solution

You can find some online API’s use free tier to test them, but… you can make it your own. So without any further intruction here is a reciepe.

Run headless chrome on your Mac:

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
  --headless \
  --remote-debugging-port=9222 \
  --disable-gpu \
  --disable-translate \
  --disable-extensions \
  --disable-background-networking \
  --safebrowsing-disable-auto-update \
  --disable-sync \
  --disable-default-apps \
  --metrics-recording-only \
  --mute-audio \

Go get this library cdp and run attached example. Done 🙂