Skip to content

YusukeHirao/sorcerer

Repository files navigation

Sorcerer

Puppeteer manipulation utilities

Sorcerer is 操作er. it's a silly name.

Install

npm i puppeteer @yusukehirao/sorcerer

yarn add puppeteer @yusukehirao/sorcerer

⚠️ Need to install with puppeteer

Features

  • Printing Page to PDF
  • Page Visual Regression [🚧 WIP]

Printing Page to PDF

Demonstration

Printing Page to PDF Demonstration Animation

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

Command Options

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.

About

Puppeteer manipulation utilities

Resources

License

Stars

Watchers

Forks

Packages

No packages published