Created
December 16, 2020 15:42
-
-
Save ragog/2d1a4964c70eb169e4a50495101e7e36 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { chromium } = require('playwright'); | |
(async () => { | |
const browser = await chromium.launch() | |
const page = await browser.newPage() | |
await page.goto('https://theheadless.dev/posts') | |
await page.pdf({ path: 'hd-posts.pdf' }) | |
await browser.close() | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment