Thumbnails position

33 views
Skip to first unread message

Samuele Panarotto

unread,
Jan 15, 2015, 5:17:13 AM1/15/15
to pdfnet-w...@googlegroups.com
Good morning,

is there a way to place the thumbnails outside the iframe of PDFViewer?

Thank you

Matt Parizeau

unread,
Jan 15, 2015, 12:44:15 PM1/15/15
to pdfnet-w...@googlegroups.com
Hi Samuele,

To load thumbnails from outside the iframe you'll want to get access to the Document object inside the iframe and then call the LoadThumbnailAsync function. Then you can layout the thumbnails as you like. For example:

$(viewerElement).on('documentLoaded', function(e) {

   
var doc = myWebViewer.getInstance().docViewer.GetDocument();
    doc
.LoadThumbnailAsync(2, function(thumb) {
       
// do something with the thumbnail
        $
('body').append(thumb);
   
});
});

If you want to see what WebViewer is doing by default then look at lib/html5/ReaderControl.js and find the initThumbnailView function.

Matt Parizeau
Software Developer
PDFTron Systems Inc.

Samuele Panarotto

unread,
Jan 16, 2015, 3:55:53 AM1/16/15
to pdfnet-w...@googlegroups.com
Thank you, I'll try immediately.
Reply all
Reply to author
Forward
0 new messages