[Okular-devel] Zoom to fit text, help needed.

Brad Hards bradh at frogmouth.net
Sun Feb 10 01:48:40 CET 2008

On Sunday 10 February 2008 11:31:02 am Mark van Rossum wrote:
> 	Hi,
> I'm implementing "Zoom to fit text" in Okular, which basically zoom to a
> bounding box which contains all information on a page.
> (thanks for the suggestions, Pino!).
> I think the best way (for now) is to generate a coarse pixmap and get the
> bounding box from that. (Using textpage  will not always give the desired
> results, as sometimes there will be graphics on the page,that one will want
> to see.) Preferably I would like to do this in the Page class.
We could expose the ArtBox attribute (or CropBox, BleedBox or TrimBox, but I 
think ArtBox is closest) within Poppler Qt4 bindings. Those are optional 
though, and may not be set. See Section 3.6.2 of the PDF spec, and look for 
the table that lists the attributes of a Page Object.


More information about the Okular-devel mailing list