GNOME Bugzilla – Bug 168450
Smarter initial window size
Last modified: 2015-06-09 21:16:55 UTC
Version details: 0.1.4 Distribution/Version: Ubuntu Hoary When a document is opened, if the pdf creator hasn't specified open "fit screen," I immediately have to click on "best fit." How about an option to make it "best fit" by default.
Just to be clear, this isn't 167602. What I'm thinking is a preferences option for viewing. Different people have different screens. I have two screens - both 17" lcd - one of which is in portrait not landscape, others may have an old crt. There is not one size fits all solution. This will become more important once the program becomes a viewer of a lot of different document formats. On the pc, irfan view controls this through a menu, which may be a good model.
Hi Tim, I'm not following why you need this preference, what is Evince doing wrong here? Are you expecting it to open up differently in landscape vs. portrait? Basically every possibly default option needs to be exhausted 10 times over before the possibility of adding a preference. And even then... ;-)
Bryan, I think the reporter want a pref about which mode to use by default (free mode, best fit, fit width). On big screens you may want best fit for example, on small screens fit width. One way to solve it would be to persist user choice. The problem is that it's probably smarter to persist user choice per document as we plan to do... so you still need a default. Now this may be crack but... maybe it would be possible to automatically choose the best mode based on window and document size? Basically if the document is readable in best fit use it, otherwise use fit width. An obvious case is that if the document is 100% zoom in best fit than we should use that mode... maybe it's possible to find a working criteria, maybe not.
Now that I have thought about it, there are really two issues. Issue 1: Evince does not respect/use the default view set in a pdf file. A pdf file can have a default view set in the file. Adobe Acrobat Pro 7 > Document Properties > Initial View Page Layout (single page, continuous, facing, continuous-facing) Magnification (150%, 125%,100%,75%,50%,25%,fit page, fit width,fit visible). So all pdfs can have some combination of these set by default (eg single page, fit page) Not really an issue for me, but there is probably an argument for respecting the authors settings. Issue 2: All pdfs opened in Evince are displayed in FitWidth. Evince does not have a user set default view which overrides this (or the above mentioned view set in the file). Issue: I open a hell of a lot of very long pdfs all day - annual reports, computer manuals, etc. In Annual Reports, for example, I might open 20 looking for one number on the balance sheet. I would like to be able to set Evince to open in fit page and (another bug) then immediately start scrolling through the pages. For example: double click, spin, spin, get number, X. The parallel I draw is irfan view (a very popular generic image viewer (though not pdf) in windows): menus > view > display options (check mark next to current option): Fit window to image (recommended) [check] Fit images to window Fit only big images to window Fit images to desktop Fit only big images to desktop Fit images to desktop width Fit images to desktop height Do not fit anything OK, this is probably over the top, but if Evince is going to become the all singing, all dancing viewer for Gnome, this is where you are going.
Could you please file 1) as a separate bug. Thanks. For 2) I'd rather try Marco's idea about figuring out the right zoom property based on Screen size, document size, and window size instead of adding a preference. This situation happens only once in the lifetime of a document assuming our per-document settings work. Everytime after the first open we should assume that all window size, and zoom settings are remembered. Which means we need to find a decent default way to automatically do this, the answer cannot be add a preference. The preference might help out a smaller percentage of people who a) know what all the options mean, b) know why the documents are opening incorrectly, and c) know that this application wide preference exists and is not just a per-document preference. The greater number of people (our target audience) are too busy to figure out what the different options mean, understand why it's happening, and look for where the right preferences are. I believe is possible to create a good default here.
*** Bug 311024 has been marked as a duplicate of this bug. ***
*** Bug 317228 has been marked as a duplicate of this bug. ***
Marco, what about just using more common setting for new documents? For example if user sets dual mode for all his documents it's reasonable to use dual for new documents also. Although it's unrelated to initial zooming, it might help with this problem.
It's an interesting idea, did not think of it. I'm just unsure if it would result in a behavior that is too difficult to predict (how many times I have to choose dual mode for it to be my new default...) and hence annoying. Not trying to make point, I'm unsure really. Anyway it's an hard question and these goes up to Bryan! :)
To post #5. Wouldn't a algorithm to handle that be something like (x1,y1) = screen size (x2,y2) = window size (x3,y3) = document size if (x1/y1)*(x2/y2)*(x3/y3) > a then best_fit else fit_page_width fi What the number 'a' should be must require some testing.
What about aiming at showing the document on the screen like it will be printed on paper and calcuate window size/zoom mode accordingly? (I thought that would be 100% but it doesnt seem the case. I guess 100% is referred to pixels atm.)
While storing these sorts of options on a per-document basis is a great idea, wouldn't the sensible default for new documents simply be to behave like almost all other applications and restore the settings as they were the last time the program was closed? It seems like the best and most obvious solution to me. I'd imagine it's also the behaviour most in line with the user's expectations, and it does avoid the need for additional preferences. This method will give somewhat sub-optimal results in certain situations, say, if the last document viewed was in landscape orientation, and the new one is in portrait orientation, but I think it more than makes up for that by it's simplicity, transparency and predictability. Currently, Evince 0.4.0 opens documents on my laptop at an illegibly small size, and I don't believe heuristics are going to solve that problem successfully across the wide range of displays that exist in the wild. In addition, heuristics would likely violate the principal of putting the user in control, and the principal of least surprise. If Evince would just remember when I open a new document that the last time I was viewing a document, I had the window maximized, my particular problem would be solved. I hope this issue is resolved soon. I really like Evince, 0.4.0 is the best pdf viewer I've ever use, but for this one problem. And it is a serious problem. Every time I open a new document, I feel like Evince is fighting me. Anyway, sorry this comment is so long. I hope it's at least a little helpful. And thanks for working on Evince. It really is quite a piece of work.
Created attachment 54079 [details] [review] Proposed patch This patch saves latest UI settings and uses them for new documents.
*** Bug 316454 has been marked as a duplicate of this bug. ***
Re: comment 12 The reason we're doing a 'smart size' algorithm and not using the 'last used size' algorithm is because we really should be able to predict document sizing based off the document and current screen. When you use the last known size what often happens is you resized the window to accomidate a PDF that is oddly shaped. The next time you open a document for the first time this odd shape is used to determine the window sizing for a document that has nothing to do with the other one. It just doesn't make sense to people or even if you look at the information available to choose window sizing. In logic terms it's like this: You have two possibly unrelated documents, you're going to size the evince window of document A based on the size of the evince windows used when looking at document B. Since the documents might have no relation at all there's no logical reason to use the sizing of B for the sizing of A. It just doesn't follow. Instead you could look at each new document, the screen size and try to figure the best way to view it from that with a gracefull fallback. In a web browser you're looking at different documents in the same window, therefore this algorithm tends to make more sense. Documents on the web use padding within the window to accomidate this and you don't want your browser to resize it's window whenever you visit a new page. For the evince use case it's a different story.
I agree that what I proposed will fail in this case, and I made note of it in my original comment. However, the overwhelming majority of documents I view (and I belive this is true for most users, though I could be wrong) have Letter sized pages in portrait orientation, so I suspect that the pathological case will be quite rare. In addition, where it does fail, it fails in a way that matches user expectations, since it is the same as the behaviour of other GNOME applications. I also agree that a 'smart size' algorithm would be preferable, and I understand that Evince's interface tries to be as document centric as possible and that persisting settings form one document to another goes against this philosophy. However, I'm not entirely convinced that such a heuristic is possible, and certainly none have been proposed in this discussion. In the mean time, I believe that my proposal will solve the problem for most users, and it is very simple to implement (in fact, there seems to be a patch already, thanks Nickolay!) There's nothing wrong with implementing a good solution, even if you think there may be a better one later.
Just as a thought exercise, here's what I think a 'smart size' algo would have to look like. 1) Assuming bug 318285 gets fixed, 100% zoom ought to be legible on any display, so use fit width mode and set the window width to the minimum of the width needed to get 100% zoom in fit width mode, and the width of the display. 2) Set the height to the minimum of the height of one page, and the height of the display. 3) If the resulting window would fill more than 90% of the display, maximize the window. That actually doesn't seem bad at all, but it's based on a couple of assumptions. First, it assumes that a document rendered at its natural size (which presumably is what you get at 100% zoom when bug 318285 is fixed) will be legible. This ought to be true, but I don't know for sure. Second, it assumes bug 318285 is fixed, but hopefully that's a no-brainer. It also needs a fallback if it can't determine a document's 'natural size' is. This should only be a problem with vector based documents that don't specify a physical page size or dpi. I have no idea if that's a common case, but I don't think it is. There is one serious problem, in that it does not adapt to users with poor eyesight, but I suppose that's what screen magnifiers are for. You could also try some sort of heuristic based on the selected GNOME font size, but then things start to get a little hairy. If those assumptions hold, then I think it would fairly well, and would probably satisfy my needs. It would be difficult to say for sure without testing though. I'm not sure if this is really better than my earlier proposal, but it is more document centric.
*** Bug 137511 has been marked as a duplicate of this bug. ***
*** Bug 337631 has been marked as a duplicate of this bug. ***
I would just like to add to the calls asking for the possibility of a "default" setting, independently of any "smart" or other option that you will devise (and which, of course, could be chosen as the default). With all due respect and gratitude for your work, it's simply the wrong idea of popularization to say "we don't add more options because the majority won't understand them". The point is to have something which is both readily usable and highly configurable, as Linux is supposed to be. It's simply too much of a nuissance if you open tons of new documents every day and you have to adjust the size before you read them, and it's pretty realistic to expect that whichever algorithm you arrive at, to many people it just won't be their favorite. Is there at least a text file that one can edit manually to adjust the initial default position and size?
*** Bug 354968 has been marked as a duplicate of this bug. ***
I've just committed a patch in HEAD that will set the size for new windows according to the page size ratio. That should make handling a bit better, so I think we can consider this problem fixed. Please test and report about bugs.
*** Bug 353366 has been marked as a duplicate of this bug. ***
(In reply to comment #23) > *** Bug 353366 has been marked as a duplicate of this bug. *** (In reply to comment #22) > I've just committed a patch in HEAD that will set the size for new windows > according to the page size ratio. That should make handling a bit better, so I > think we can consider this problem fixed. > > Please test and report about bugs. Hello guys. I've installed several versions of Evince, last one is 3.1.2, and evince still starts up always the same, way-to-small size. Am I doing something wrong here? This is getting annoying, and is probably going to be the reason for not using evince anymore... John
Hi Nickolay, I'm sure the heuristics in that patch will solve the problem for an increased percentage of users. Re. the general discussion on respecting user preferences vs. not littering the interface with extra settings, I think a fair solution is that when a user makes a change to the interface, e.g. by ticking View->Dual, then the program should respect this as the default the next time the program is opened. I think people here are worrying too much about the user only intending to apply the setting to a single document ... if this is the case, then it just means an extra action to reset the setting the next time another document is opened. As it stands, there is still the possibility that the user will have to apply the setting for *every* document that they open. Aside: I'm running 2.32.0 Eoghan
As a student, I have to switch constantly between 2 PDF sizes: slides (courses) and "A4 paper format" (exercises). Evince is really annoying in this case, it fails to auto-detect usable settings. By default it uses "fit page width" but this does not work at all for slides, which need "best fit". If I set "best fit" by default (ctrl+t), then it messed up "A4" documents (unreadable, text is too small). So, whatever I do, I have to manually change settings almost on one in two documents. Here is a screenshot I made after opening a random "slide formated" PDF: http://malizor.org/public/images/evince-slide.png I currently use Evince 3.2, but I had this problem on older versions too.
Still exists. Some dosuments opened in a very small window
It's impossible to make smart window size because different docs have different DPIs, text size and other option. If text is photo - then it impossible for evince to guess window size. All apps except Evince (Foxit, Adobe, Sumatra, Okular, QPDFview) do not suggest such kind of pain. Why devs can't make option to disable this crap?