View as Markdown
PDFCrowd icon

PDFCrowd ACTION

Convert HTML to PDF

Convert URL or HTML to PDF. See docs
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's PDFCrowd account once, then configure and run Convert HTML to 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: "pdfcrowd-html-to-pdf",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    pdfcrowd: { authProvisionId: "apn_xxxxxxx" },
    url: "URL",
    htmlString: "HTML Content",
  },
})

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.

Convert HTML to PDF inputs
Property Type Description
url URL string
The URL to convert. Must be publicly accessible.
Optional
htmlString HTML Content string
Raw HTML content to convert to PDF.
Optional
outputFilename Output Filename string
The filename for the generated PDF.
Optional
pageSize Page Size string
Set the output page size using standard formats (A4, Letter, A3, etc.)....
Optional
pageWidth Page Width string
Set custom page dimensions when standard sizes don't fit your needs....
Optional
pageHeight Page Height string
Set custom page height for specific formats like receipts, banners, or...
Optional
orientation Orientation string
Set the output page orientation to portrait or landscape. Use landscape...
Optional
marginTop Margin Top string
Control white space at the top of the page. Increase for header space,...
Optional
marginRight Margin Right string
Control white space on the right edge of the page. Increase for...
Optional
marginBottom Margin Bottom string
Control white space at the bottom of the page. Increase for footer...
Optional
marginLeft Margin Left string
Control white space on the left edge of the page. Increase for...
Optional
contentViewportWidth Content Viewport Width string
Set the viewport width for formatting the HTML content when generating...
Optional
customCss Custom CSS string
Apply custom CSS to the input HTML document to modify the visual...
Optional
customJavascript Custom JavaScript string
Run a custom JavaScript after the document is loaded and ready to...
Optional
elementToConvert Element To Convert string
Convert only the specified element from the main document and its...
Optional
showExpertOptions Show Expert Options boolean
Enable to show advanced conversion options
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
pdfcrowd-html-to-pdf
Version
0.1.0
App
PDFCrowd
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes