← Back to Plugins
Integration

Pdf To Png

PdfApiHub By PdfApiHub 👁 27 views ▲ 0 votes

OpenClaw plugin to convert PDF pages to PNG/JPG/WebP images — configurable DPI (72-300), page selection, resize dimensions, background color fill, thumbnail generation, and image-to-PDF reverse conversion. Powered by PDFAPIHub API. Free API key at pdfapihub.com

GitHub

Install

openclaw plugins install clawhub:pdf-to-png

Configuration Example

{
  "plugins": {
    "entries": {
      "pdf-to-png": {
        "enabled": true,
        "env": {
          "PDFAPIHUB_API_KEY": "your-api-key-here"
        }
      }
    }
  }
}

README

# PDF to PNG — OpenClaw Plugin

Convert PDF pages to PNG, JPG, or WebP images using the [PDFAPIHub](https://pdfapihub.com) API. This OpenClaw plugin renders PDF pages as images with full control over DPI, dimensions, and format — plus quick presets for thumbnails and social media previews.

## What It Does

Render any PDF page as an image — perfect for thumbnails, social previews, print-ready exports, and document previews without embedding a PDF viewer.

### Features

- **PNG/JPG/WebP Output** — Choose the best format for your use case
- **Configurable DPI** — 72 (fast) to 300 (print quality)
- **Page Selection** — Convert specific pages or ranges (e.g. `1-5`, `1,3,5`)
- **Resize** — Set custom width/height for thumbnails or social media
- **Background Color** — Fill transparent PDF backgrounds with any hex color
- **Thumbnail Preset** — One-command first-page thumbnail at 200px
- **OG Image Preset** — One-command 1200x630 social media preview
- **Image to PDF** — Reverse: combine images into a PDF with page layout
- **Page Size Control** — A4, Letter, original for image-to-PDF
- **Fit Modes** — fit, fill, stretch, original for image-to-PDF layout

## Tools

| Tool | Description |
|------|-------------|
| `pdf_to_png` | Convert PDF pages to PNG/JPG/WebP with full control |
| `pdf_thumbnail` | Quick first-page thumbnail (200px width) |
| `pdf_to_og_image` | 1200x630 social media preview from first page |
| `images_to_pdf` | Combine images into a PDF with page layout |
| `pdf_info` | Check page count before converting |

## Installation

```bash
openclaw plugins install clawhub:pdf-to-png
```

## Configuration

Add your API key in `~/.openclaw/openclaw.json`:

```json
{
  "plugins": {
    "entries": {
      "pdf-to-png": {
        "enabled": true,
        "env": {
          "PDFAPIHUB_API_KEY": "your-api-key-here"
        }
      }
    }
  }
}
```

Get your **free API key** at [https://pdfapihub.com](https://pdfapihub.com).

## Usage Examples

Just ask your OpenClaw agent:

- *"Convert this PDF to PNG images"*
- *"Render pages 1-5 at 300 DPI as JPGs"*
- *"Generate a thumbnail of this PDF"*
- *"Create an OG image from this PDF for social media"*
- *"Combine these scanned images into one PDF"*

## Use Cases

- **Document Thumbnails** — Preview images for file managers and document lists
- **Social Media Previews** — OG images for link sharing on Twitter/Facebook/LinkedIn
- **Print-Ready Exports** — High-DPI renders for print workflows
- **E-commerce** — Convert product PDF spec sheets into gallery images
- **Slide Extraction** — Pull individual slides from PDF presentations as images
- **Document Previews** — Show PDF content without embedding a PDF viewer
- **Scanned Document Assembly** — Combine scanned page images into one PDF

## Limits

- Max 100 pages per request
- DPI range: 72–300
- Max resize dimension: 10000 px
- Max 100 images for image-to-PDF

## API Documentation

Full API docs: [https://pdfapihub.com/docs](https://pdfapihub.com/docs)

## License

MIT
integration

Comments

Sign in to leave a comment

Loading comments...