Mit einer Batch-Datei alle PDF Dateien nach PNG umwandeln

Mit dem folgenden Skript kann man alle PDFs eines Verzeichnisses nach PNG wandeln. Poppler muss dazu installiert und im Pfad sein.


@echo off
setlocal enabledelayedexpansion

REM Set the output image format (e.g., png, jpeg, or ppm)
set FORMAT=png

REM Loop through all PDF files in the current directory
for %%F in (pg*.pdf) do (
echo Converting %%F...
pdftoppm -%FORMAT% "%%F" "%%~nF"
)

echo Done!
pause

Uwe

Uwe Ziegenhagen likes LaTeX and Python, sometimes even combined. Do you like my content and would like to thank me for it? Consider making a small donation to my local fablab, the Dingfabrik Köln. Details on how to donate can be found here Spenden für die Dingfabrik.

More Posts - Website