How to Use the PDF Tool in Openclaw

Image
Table of contents: [Show]

Openclaw's PDF tool lets you analyze documents directly in your AI workflows. Whether you need to summarize reports, compare documents, or extract specific data, this tool handles PDF processing efficiently with support for multiple execution modes.

How PDF Processing Works

Openclaw handles PDFs in two different ways depending on your model provider:

Native Provider Mode

Used for anthropic and google providers. The tool sends raw PDF bytes directly to the provider's API.

Important limitation: Native mode does not support the pages parameter. If you try to filter by page, the tool returns an error.

Extraction Fallback Mode

Used for non-native providers. It first attempts to extract text from selected pages (up to a default of 20 pages). If the extracted text is less than 200 characters, it renders the selected pages as PNG images and sends those to the model alongside the extracted text.

Openclaw PDF Tool

Quick Start Examples

Analyze a Single PDF

{ "pdf": "/tmp/report.pdf", "prompt": "Summarize this report in 5 bullets" }

Compare Multiple PDFs

{ "pdfs": ["/tmp/q1.pdf", "/tmp/q2.pdf"], "prompt": "Compare risks and timeline changes across both documents" }

Use Fallback Model with Page Filter

{ "pdf": "https://example.com/report.pdf", "pages": "1-3,7", "model": "openai/gpt-5-mini", "prompt": "Extract only customer-impacting incidents" }

Related Tools

For web content extraction, check out our guide on Firecrawl Web Scraping. If you need to search the web while working with documents, see Brave Search Openclaw.

Best Practices and Troubleshooting

  • Page limits: Default extraction covers up to 20 pages. For larger documents, specify relevant pages.
  • Provider selection: Use Anthropic or Google models for native PDF support without page restrictions.
  • Fallback rendering: When text extraction is insufficient, the tool automatically renders pages as images.
  • Remote PDFs: You can pass URLs directly—the tool downloads and processes them automatically.

The PDF tool integrates seamlessly with Openclaw's workflow automation, making document analysis a natural part of your AI-powered processes.