sumatrapdfreader / sumatrapdf

SumatraPDF reader
http://www.sumatrapdfreader.org
GNU General Public License v3.0
13.45k stars 1.71k forks source link

Expose mutool functionality via command-line #2559

Open kjk opened 2 years ago

kjk commented 2 years ago

SumatraPDF is based on mupdf which has a cmd-line tool mutool to do various operation on PDF files.

Expose this via SumatraPDF cmd-line interface (SumatraPDF tool ....)

canny[bot] commented 2 years ago

This issue has been linked to a Canny post: mutool-like functionality. :tada:

GitHubRulesOK commented 2 years ago

Great as it allows pdf manipulation like invert whole file (oh nooo)!!

Unsure of benefits but it does allow for many possibilities the issue may be how to get interactive input of args, I usually drive via a batch.cmd with user interaction/choice(s) from externalviewers.

fml2 commented 2 years ago

Why not use another tool for that, e.g. qpdf? Sumatra's value is its small size and focus IMO.

GitHubRulesOK commented 2 years ago

One very interesting module is based on Go, PDFcpu it has a very very small footprint 3.3 MB as a zipped binary for so many related functions but is perhaps too versatile since you can just like MuTool build a whole PDF from just words plus extract embedded files images or rotate/shuffle pages or N-Up rebuild booklets, from a security aspect beware the java on/off switch with MuTool. PDFcpu can write a pretty Hello World! example to pdf page out and both are under 1KB of data thus lean and mean for 12 chars by PDF standards

fml2 commented 2 years ago

I might have been unclear, but I meant that it's not necessary to have this function (command line based manipulations of PDF) in SumatraPDF at all. Users who need this can use other existing programs for this.