sumatrapdf icon indicating copy to clipboard operation
sumatrapdf copied to clipboard

Command to render a page and save it as an image

Open luauser32167 opened this issue 11 months ago • 3 comments

The command could work for multiple pages (page range) and save them to the desktop (or some other configurable directory). The format of the images should be lossless, 'png' for example.

luauser32167 avatar Mar 09 '25 18:03 luauser32167

Not a problem if you use any extra graphics application such as PDFtoPNG or one of many others as an external library function so I can add that to the menu as an external executable via scripts.

Image

Mine is here but on running I see some oddities ? (was adapted from TXT so header is wrong)

https://github.com/GitHubRulesOK/SumatraPDF-Plus/blob/master/Plus/ExportPng.cmd Image

Result is separate PNGs

Image

GitHubRulesOK avatar Mar 09 '25 20:03 GitHubRulesOK

Using 3rd party tools kind of defeats the point.

luauser32167 avatar Mar 10 '25 07:03 luauser32167

MuPDF is the 3rd Party tool SumatraPDF is built on it is just that MuPDF has about 20 different tools for different tasks so one for Android one for Web and Windows one for Python and one for exporting images (MuRaster) Yesterdays version but it is for other PN types not PNG

Image

but Mutools is far more versatile as a toolbox of more than most and has PNG export but Just like its sister GhostScript it is not so good as a screen display tool. The MuPDF-GL that SumatraPDF uses has no ability to "save as" anything else

Image

Image

GitHubRulesOK avatar Mar 10 '25 11:03 GitHubRulesOK