Add evince "fit to height" mode
Submitted by Hans Ulrich Niedermann
Link to original bug (#772469)
Description
evince "fit to height" mode
The "fit to height" mode complements the existing "Fit page" and "fit to width" modes for cases where the PDF page is wider than the evince window (wider in the sense of a higher width:height ratio).
Use case
Many paper brochures have a layout of two landscape pages side by side. If the printed content goes across the center fold, often the PDF downloads for those brochures contain two paper pages per PDF page, so that the PDF page can show the content without lines or breaks in the middle.
For a typical 1.4:1 or 1.5:1 paper page ratio, this makes the PDF page 28:10 or 30:10 which is much wider than a raw 16:10 display, and is still wider than a 16:9 display even with a few horizontal status and menu bars thrown in.
I believe this is the use case which was missing in https://bugzilla.gnome.org/show_bug.cgi?id=343735 in 2006. Those kinds of PDF files are now more than frequent enough to have made me invest several hours in writing both the code and write this report.
Implementation Overview
The implementation consists of several parts:
-
libview
: for the actual zoom factors -
browser-plugin
: User interface hookups (untested) -
previewer
: works, but the icons need a bit of work. -
evince shell
: User interface hookups (tested)
I am attaching my patches, and also pushing the code to
https://github.com/ndim/evince https://github.com/ndim/evince.git branch feature/fit-height/master-1
.
User Documentation
There is a new paragraph in help/C/movingaround.page
detailing the
"Fit Height" option alongside the existing paragraphcs on "Fit Width"
& Co.
Translations
The new "Fit _Height"
string has been marked for translation, but I
have not added actual translations.
Icons
The previewer icons are a bit inconsistent.
Version: git master