[Okular-devel] Zoom to fit text, help needed.
Albert Astals Cid
aacid at kde.org
Sun Feb 10 01:58:35 CET 2008
A Diumenge 10 Febrer 2008, Brad Hards va escriure:
> 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.
And then we support !PDF on okular too ;-)
Albert
>
> Brad
>
> _______________________________________________
> Okular-devel mailing list
> Okular-devel at kde.org
> https://mail.kde.org/mailman/listinfo/okular-devel
More information about the Okular-devel
mailing list