pdf_to_images: Convert all pages of a PDF to images

View source: R/pdf.R

pdf_to_imagesR Documentation

Convert all pages of a PDF to images

Description

Renders every page of a PDF file to PNG images at the specified DPI. Requires the pdftools package.

Usage

pdf_to_images(pdf_path, image_dir, dpi = 300)

Arguments

pdf_path

Path to the PDF file.

image_dir

Directory to save PNG images into.

dpi

Resolution in dots per inch (default: 300).

Value

A character vector of image file paths.

Examples

## Not run: 
images <- pdf_to_images("document.pdf", "images", dpi = 300)

## End(Not run)

PaddleOCR documentation built on Aug. 30, 2026, 5:07 p.m.