I feel like everytime I load a PDF file inline in Safari the next thing I do is start zooming it up so I can read it more easily. I would prefer behavior more like Preview with the autoscale option on. In this mode, the view is scaled to fit based onthe page length, and advancing moves the doc in whole page increments. It turns out you can get this behavior using the PDF context menu to set continuous=off and autosize=on. But this is tedious to do for every PDF file I open. Thus what I really want is either a preference for turning this behavior on permanently, or else for the current UI settings to be sticky.
I think making the UI settings sticky is a good idea. This could be implemented by adding preferences to WebPreferences that start out at the initial PDFKit settings. These preferences would be used whenever WebPDFView loads a document, and would be altered whenever the user chooses from the context menu. Ideally pages in the back/forward list would continue to be displayed with their original settings when revisited in the b/f list. Also, I think that ideally reloading would not affect the settings for the displayed page (that is, it wouldn't reload using prefs values that had changed since it was first loaded), but getting this exactly right could be treated as a separate, lower-importance bug I think.
I am likely to take a crack at this.
Created attachment 3188 [details] proposed patch For this round the UI is simply that changes to the PDF viewing params are sticky.
Comment on attachment 3188 [details] proposed patch Trey and I discussed a couple of tweaks on IRC, so I'm giving this version a review-
Created attachment 3195 [details] patch corrected per review
Comment on attachment 3195 [details] patch corrected per review I'll check this in.
checked in