[poppler] thumbnails
Albert Astals Cid
aacid at kde.org
Wed May 20 13:33:23 PDT 2009
A Dimecres, 20 de maig de 2009, Shawn Rutledge va escriure:
> On Tue, May 19, 2009 at 2:52 PM, Albert Astals Cid <aacid at kde.org> wrote:
> > A Dimarts, 19 de maig de 2009, Shawn Rutledge va escriure:
> >> Is there support for reading thumbnails that are embedded in a PDF
> >> file?
> >
> > Poppler core has it
> >
> >> I get the impression that most PDF viewers aren't using those.
> >
> > Because are of hardcoded and makes no sense in a world were most PDF
> > viewers let you resize randomly the thumbnail bar. Also i'm not sure if
> > the number of PDF files with embedded thumbnails is "high".
>
> Rendering each page is slow that way though.
>
> Acrobat 7 used the thumbnails nicely: when opening up a PDF that has
> them, they display very quickly, and it was possible to drag pages
> around to re-order them. Acrobat 9 has the resizable thumbnails, so
> now it's very slow, and stupidly it re-renders them every time they
> are scrolled into view or re-ordered, so this kind of "slide-sorter"
> method of putting pages in order is now impractical. (Of course they
> should at least cache them in memory, and should use multiple cores to
> speed it up, but they don't.)
>
> I also was wondering if today's GPUs could render PDFs somehow, fast
> enough to get all the thumbnails cached at a rate of 100 pages per
> second or so, but that's another topic. Maybe somebody needs to start
> a CUDA poppler implementation? :-) (not that I have any experience
> with that sort of thing, it's just a brainstorm)
>
> >> And I don't really see how to get them using the Qt4 bindings, at
> >> least.
> >
> > Right, the Qt4 bindings don't expose thumbnail reading, if you'd like to
> > have them, do you think you can contribute a patch?
>
> Probably I could, I'm familiar enough with Qt although haven't looked
> at the implementation of those bindings yet. Can you give a general
> outline how to get the thumbnails using core?
See loadThumb Page.h that should give you the data of the thumbnail, once you
have it you just create a QImage with it and return it to the user.
Albert
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler
More information about the poppler
mailing list