View as Markdown
Playwright icon

Playwright ACTION

Page PDF

Generates a pdf of the page and store it on /tmp directory. See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Playwright account once, then configure and run Page PDF from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "playwright-page-pdf",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    playwright: { authProvisionId: "apn_xxxxxxx" },
    url: "URL",
    filename: "File Name",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Page PDF inputs
Property Type Description
url URL string
The URL of the page.
Required
filename File Name string
The PDF file name with extension, e.g. page.pdf. it will be stored on /tmp directory.
Required
emulateMedia Emulate Media boolean
Set true to generate a pdf with screen media.
Required
viewportWidth Viewport Width integer
The width of viewport. default: 1280
Optional
viewportHeight Viewport Height integer
The height of viewport. default: 720
Optional
syncDir SyncDir dir
Required

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
playwright-page-pdf
Version
0.0.5
App
Playwright
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes