[Okular-devel] Zoom to fit text

Pino Toscano toscano.pino at tiscali.it
Sun Feb 3 00:11:32 CET 2008


Hi,

> A helpful feature on any document reader would be to automatically zoom in
> so much that the white margins of a page are not displayed. This maximizes
> screen real estate.

Yep, we have it in TODO since quite some time now :)

> And I have been doing some coding in Okular, and some parts of such a
> system are now working.

Nice!

> Two questions:
> - Is someone already working on this?

Not that I'm aware of.

> There are some commented out sections in pageview.cpp that point to that.

Yeah, they are sort of skeleton for it.
Basically, there is the slotRelayoutPages() function that places the pages in 
the page view, which in turn calls updateItemSize() for each PageViewItem 
(the class representing a "page" in the view). That function is responsible 
for giving the page item sizes the correct size and position, depending on 
the current zoom level.
I think implementing properly that case should do the trick (of course, this 
means knowing the "text area" for each page, in a fast way...).

> - If not, who can help me to integrate the code better in Okular?

We can, just keep informing us about your progress (questions, patches, 
etc) :)

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/okular-devel/attachments/20080203/19502f19/attachment.pgp 


More information about the Okular-devel mailing list