yinka/PDF-Generator

A fork of Jancurn's url-to-pdf act with added name input & and delay until network is idle. Opens a web page in headless Chrome using Puppeteer and prints it to PDF. The input is a JSON object such as: { "url": "https://wiki.org", "pdfOptions": { "format": "a4", "printBackground": true }, "name": "Wiki.pdf" } The "pdfOptions" object is passed to Puppeteer's page.pdf() function - see https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagepdfoptions Output is a PDF file.

Modified
Last run
Used 880 times

API

To run the actor, send a HTTP POST request to:

https://api.apify.com/v2/acts/yinka~PDF-Generator/runs?token=<YOUR_API_TOKEN>

The POST payload will be passed as input for the actor. For more information, read the docs.

Input example

Content type

application/json; charset=utf-8

Input example

{
  "url": "https://wiki.org",
  "pdfOptions": {
    "format": "a4",
    "printBackground": true
  },
  "name": "Wiki.pdf"
}

App

To run the actor in the app, simply click the button below