View as Markdown
FileToPDF.dev icon

FileToPDF.dev ACTION

Convert a File to PDF

Convert Word, Excel, PowerPoint, images and 130+ formats into PDF — from a file or a public URL. The converter is chosen automatically from the file extension. See the documentation.
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's FileToPDF.dev account once, then configure and run Convert a File 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: "filetopdf_dev-convert-file",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    filetopdf_dev: { authProvisionId: "apn_xxxxxxx" },
    file: "File",
    url: "File URL",
  },
})

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 a File to PDF inputs
Property Type Description
file File string
The file to convert — a path to a file in /tmp (map it from a previous step, e.g. Google Drive, Dropbox, an HTTP download, an email attachment) or a downloadable URL. We read it and upload it. Leave blank if you're using a File URL instead.
Optional
url File URL string
Or a public http(s) link to your file — FileToPDF downloads it server-side and converts by its extension. (Private/internal addresses aren't allowed.) Used only when no File is provided.
Optional
filename File Name string
Your file's name, including its extension — e.g. report.docx. We use the extension to pick the converter and to name your PDF. Usually detected automatically; set it here if your file has no extension or the wrong one.
Optional
landscape Landscape Orientation boolean
Render the page in landscape orientation.
Optional
nativePageRanges Page Ranges string
Limit output to specific pages, e.g. 1-3 or 2,5-7.
Optional
pdfa PDF/A Archival Format string
Produce an ISO-standardised archival PDF.
Optional
pdfua PDF/UA (Accessibility) boolean
Produce an accessible, tagged PDF/UA document.
Optional
sourcePassword Source Document Password string
Password to open a protected source document (office files only).
Optional
userPassword Output Open Password string
Encrypt the resulting PDF; this password is required to open it.
Optional
ownerPassword Output Permissions Password string
Restrict editing/printing of the resulting PDF.
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
filetopdf_dev-convert-file
Version
0.0.2
App
FileToPDF.dev
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes