render
Render PDF pages as images or a single rasterized PDF
Usage
pdftl
<input>render[<page_specs>...][dpi=<val>][output<template>]
Details
The render operation converts PDF pages into raster images or a single PDF.
It respects page rotation, cropping, and current pipeline modifications.
You can specify a page range using standard page specifications (e.g., 1-5, even).
If no pages are specified, all pages are rendered.
The dpi=<val> argument sets the raster image resolution, in dots per
inch (default: 150). It must be a positive number.
The default <template> is page_%d.png. The parameter %d is replaced
with the output page counter value, starting at 1. Standard formatting
directives like %03d are supported.
Single PDF Output:
If the output template ends with .pdf and contains no % directive
(e.g., output out.pdf), all rendered pages will be combined into a
single PDF file. Note: This keeps all page images in memory until saved.
Image Output:
If rendering to images, the output format is guessed from the <template>
extension (e.g., .png, .jpg). If no extension is given, PNG is used.
Examples
Render all pages at 150 dpi to
page_1.png,page_2.png, …
pdftl in.pdf render
Render pages 1 to 5 at 300 dpi to
out001.png, …
pdftl in.pdf render 1-5 dpi=300 output out%03d.png
Render odd pages into a single PDF document at 150 dpi
pdftl in.pdf render odd output rasterized.pdf
Tags: images, experimental, alpha
Source: pdftl.operations.render
Read online: https://pdftl.readthedocs.io/en/stable/operations/render.html
Type: Operation