-
Notifications
You must be signed in to change notification settings - Fork 0
Puppeteer Quick Guide
KeithPoonNS edited this page Nov 11, 2021
·
1 revision
Repeating header/footer in Puppeteer is inconvenience for me.
I tried another called Puppeteer Report
Both syntax is similar but slightly difference
Interactive Documentation provide better navigation, allows search , and consolidated the historical API version (since v0.9.0).
- Generate screenshots and PDFs of pages.
- Crawl a SPA (Single-Page Application) and generate pre-rendered content (i.e. "SSR" (Server-Side Rendering)).
- Automate form submission, UI testing, keyboard input, etc.
- Create an up-to-date, automated testing environment. Run your tests directly in the latest version of Chrome using the latest JavaScript and browser features.
- Capture a timeline trace of your site to help diagnose performance issues.
- Test Chrome Extensions.
if more prefer the plain text api doc, please read: Puppeteer API Tip-Of-Tree
Plus something common features you want in the printing result, please read the supplementary examples like
How to print pages/ page numbers/pagination in pdf puppeteer? #5345
- displayHeaderFooter, headerTemplate, footerTemplate
- inline css for increase the font size
- inline css for absolute positioning
Create PDFs with Node.js and Puppeteer
- run js to execute Puppeteer in console/command prompt
Convert web pages into PDFs with Puppeteer and NodeJS
- run js in node
- build a web service(API) to generate and respond PDFs from URLs
- customize the default header, footer, and pagination
- use JavaScript code to apply customization in the converting process