View Single Post
Old 01-26-2008, 03:57 PM   #1
alanine
Connoisseur
alanine has a complete set of Star Wars action figures.alanine has a complete set of Star Wars action figures.alanine has a complete set of Star Wars action figures.alanine has a complete set of Star Wars action figures.
 
Posts: 54
Karma: 399
Join Date: Sep 2007
Device: iLiad v2
continuous mode and column view in ipdf

I propose a new way to implement column view. Here it goes...

Continuous mode is flawed

In its current implementation, it moves the view port (the screen) downwards (or upwards if prevpage) by one screen height, and often creates a view of 2 pages next to each other vertically, and hence the illusion of "continuous". But this is useless because

1. The top/bottom page margin takes up a big chunk of the screen;
2. Putting 2 pages vertically makes little sense.

So a modified continuous mode is to always stay within a single page until it reaches the border. In other words, it's like fitting multiple screens onto a page when page height is greater than screen height, where muliple screens may overlap.

Column view is a natural extension

So continuous mode is about fitting screens vertically on a page, and column view is about fitting screens first vertically and then horizontally. So a user can easily do column views by first zooming into one part of the column and then switching to continuous mode.

I believe this could be the simplest modification to implement column view with no extra button or icon added. My earlier 2-column patch only works with 2 columns, and WPD's column patch only works with text PDFs but not image PDFs, and poppler has to be patched too.

Download

I'm attaching the modified ipdf binary (to install, just copy it to override the system /usr/bin/ipdf binary, back up first if you are worried), as well as the patch.

Continuous mode now works differently:

1. it will skip if the next or previous screen to the edge of the page is less than 1/3 screen. (This is mostly to skip margin, but since it can't tell whether it's really margin or text, so you may need to adjust the position by panning. It rarely happens though)
2. if you start from a page top position, it'll always start from the same position when it comes to the next or previous page;
3. to do column view, switch to continuous mode, zoom to the top left column, and now flip the bar to follow columns. Sometimes you'll also need to pan to adjust position to suit your need.
Attached Files
File Type: zip ipdf.zip (35.7 KB, 449 views)
File Type: zip ipdf-cont-col.patch.zip (1.3 KB, 401 views)

Last edited by alanine; 01-28-2008 at 08:28 AM. Reason: fix the download
alanine is offline   Reply With Quote