Puppeteer manipulation utilities
Sorcerer is 操作er
. it's a silly name.
npm i puppeteer @yusukehirao/sorcerer
yarn add puppeteer @yusukehirao/sorcerer
puppeteer
- Printing Page to PDF
- Page Visual Regression [🚧 WIP]
sorcerer -p <URL>
sorcerer -p <URL1> -p <URL2> -p <URL3>
- Printing parallel.
- Print with note space.
- Fit width for A4.
- Create two document files for desktop and mobile on each page.
- Support the basic access authentication.
- Support lazy loading images and intersection observed elements because it scrolls to the page bottom.
- PDF Samples
Option | Short | Default | Description |
---|---|---|---|
--print |
-p |
It accepts an URL then it prints the site to PDF. | |
--outDir |
-o |
CWD | Output destination. |
--headless |
true |
Headless mode of Puppeteer. |