As @cronopios mentions, if you need a bit of flexibility in the output, you need to use a wrapper over Chromium — either Electron, or (the more recent) Puppeteer.
Other than that, it runs the article through Readability to extract just the main content and applies customizable CSS / HTML to it.
chrome --headless --disable-gpu --print-to-pdf https://www.google.com/