How to hide thumbnails

15 views
Skip to first unread message

Jérémy Guyenot

unread,
Mar 21, 2018, 6:03:05 PM3/21/18
to PDFTron WebViewer

Hello,

we have replaced an ActiveX component with your PDFViewer 3.1.0 solution.

In our software, we proposed to split pages into multiple documents.
For example, x pages as document A, X pages as document B, ...

To make the component activeX allowed to hide the pages "extracted" (without going directly by a deletion).
We are trying to reproduce the same way.

To hide the selected thumbnails, we use this:

ReaderControl.prototype.actionHideThumbnails = function (lstInd) {
   if (typeof (lstInd) == 'string') {
      lstInd = lstInd.split (',');
   }
   lstInd.forEach (function (elt) {
      $ ('# thumbContainer' + elt) .hide ();
   });
};

This masks the thumbnails very well. The problem comes later. The selection becomes incoherent, or even, thumbnails are no longer visible on some pages.

Do you have another functional solution to hide some thumbnails without calling doc.removePages (...).

Matt Parizeau

unread,
Mar 22, 2018, 2:33:47 PM3/22/18
to PDFTron WebViewer
Hi Jérémy,

Since you're hiding some of the thumbnails this means that calculations for which thumbnails are visible are probably off and causing problems. It looks like there are two places to modify in ReaderControl.js that make calculations like this: the "getVisibleThumbs" function and the "pageNumberUpdated" event handler.

Matt Parizeau
Software Developer
PDFTron Systems Inc.
Reply all
Reply to author
Forward
0 new messages