@rishabhdugar

PDF to PNG

Convert PDF pages to PNG/JPG/WebP images. Configurable DPI, page selection, resize dimensions, background color fill, thumbnail generation, and image-to-PDF reverse conversion. Powered by PDFAPIHub.

当前版本
v1.0.0
code-plugin社区source-linked

PDF to PNG — OpenClaw Plugin

Convert PDF pages to PNG, JPG, or WebP images using the PDFAPIHub 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

ToolDescription
pdf_to_pngConvert PDF pages to PNG/JPG/WebP with full control
pdf_thumbnailQuick first-page thumbnail (200px width)
pdf_to_og_image1200x630 social media preview from first page
images_to_pdfCombine images into a PDF with page layout
pdf_infoCheck page count before converting

Installation

openclaw plugins install clawhub:pdf-to-png

Configuration

Add your API key in ~/.openclaw/openclaw.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.

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

License

MIT

源码与版本

源码仓库

PdfApiHub/openclaw-pdf-to-png

打开仓库

源码提交

9ad665593cae767b96f10f6d58e7d86a925375b6

查看提交

安装命令

openclaw plugins install clawhub:pdf-to-png

元数据

  • 包名: pdf-to-png
  • 创建时间: 2026/04/17
  • 更新时间: 2026/04/17
  • 执行代码:
  • 源码标签: main

兼容性

  • 构建于 OpenClaw: 2026.3.24-beta.2
  • 插件 API 范围: >=2026.3.24-beta.2
  • 标签: latest
  • 文件数: 7