I tried
$ gs -o out.pdf
-sDEVICE=pdfwrite
-c "[ /PageMode /UseNone /Page 1 /View [ /XYZ null null 1 ] "
-c " /PageLayout /SinglePage /DOCVIEW pdfmark"
-f in.pdf
from Can I create a PDF which will always opens at zoom level 100%? and it seems to embed the commands in out.pdf
$ strings out.pdf |grep -wE 'XYZ|PageMode|Fit.*'
/OpenAction [4 0 R /XYZ null null 1]
/PageMode/UseNone
and I tried other options like /View [ XYZ null null 0.75 ]
and /View [ /FitV ]
– they also show up in the produced pdf
$ strings out.pdf |grep -wE 'XYZ|PageMode|Fit.*'
/OpenAction [4 0 R /FitV]
/PageMode/UseNone
but regardless of options, Evince always shows the last zoom/fit I manually set, while Atril always does fit to width and Firefox always does “automatic scale” (which seems to be fit to width for my pdf; I think Chromium does the same though it only shows it as the zoom percentage), while Zathura always opens in some kind of “fit to tiny window”.
I’d prefer for it to open at “fit to height” or at least not so zoomed in. Is there some other trick than pdfmarks that might help here? The initial page is portrait orientation, so on most laptops and wide screens in Firefox etc. it won’t show the whole page when fit to width.