make Thumbnail from PDF like Explorer

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

make Thumbnail from PDF like Explorer

Post by AUGE_OHR »

hi,

Windows can show Thumbnail from PDF in Explorer
Explorer_PDF_Thumbnail.png
Explorer_PDF_Thumbnail.png (606.63 KiB) Viewed 1112 times
but Adobe Acrobat, Foxit Reader or SumatraPDF must be installed as "external" reader (does not work with Portable Version)

SumatraPDF use MuPDF Library
https://github.com/ArtifexSoftware/mupdf

you can download MuPDF here
https://mupdf.com/releases/index.html (mupdf-1.20.0-windows.zip)

it include mupdf.exe, mupdf-gl.exe and mutool.exe

make a *.BAT File and include this Line

Code: Select all

mutool draw -o "%1.png" -r 96 -h 150 "%1" 1-1
it will generate Thumbnail "Filename.PNG" with 96 DPI and 150 Pixel Height
1-1 mean only Page 1
1-N are Tbumbs from 1 until End

Sample
g:\CT>mutool draw -o "ct.22.22.pdf.png" -r 96 -h 150 "ct.22.22.pdf" 1-1
page ct.22.22.pdf 1
see upper left in Snapshot
have fun
Jimmy
User avatar
serge_girard
Posts: 3420
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: make Thumbnail from PDF like Explorer

Post by serge_girard »

Thanks Jimmy!
There's nothing you can do that can't be done...
Post Reply