Page Printer avatar
Page Printer

Pricing

Pay per usage

Go to Store
Page Printer

Page Printer

Developed by

Marco Gullo

Marco Gullo

Maintained by Community

Performs screenshots or print web pages in PDF format.

0.0 (0)

Pricing

Pay per usage

3

Total users

40

Monthly users

4

Runs succeeded

>99%

Last modified

2 months ago

Tips and tricks

Pre-function

You can execute arbitrary code before performing a screenshot, passing a function which takes as input the Playwright Crawling Context.

You can also register information which will be written to the output Dataset, writing into the record with the key notes in the userData.

Example:

const preFunction = async (context) => {
const { request, page } = context;
const { userData } = request;
const { notes } = userData;
// Perform some operation in the page
await page.selector('...').click();
if (page.selector('...').isVisible) {
notes.isElementVisible = true;
} else {
notes.isElementVisible = false;
}
}

Output data:

[
{
"url": "https://...",
"fileUrl": "...",
"fileKey": "...",
"notes": {
"isElementVisible": true
}
},
{
"url": "https://...",
"fileUrl": "...",
"fileKey": "...",
"notes": {
"isElementVisible": false
}
}
]

Contributing

Input schema

Edit input schema in src-schemas. You can use any JSON schema option, not just the ones from Apify specifications.

Install apify-schema-tools globally and run:

npx generate-apify-type --input && npx generate-apify-schema --input