RE: Only ten thumbnails are generated for document preview

thumbnail
Marco Azzalini, modified 6 Years ago. Regular Member Posts: 146 Join Date: 11/18/14 Recent Posts
Hi, I have an 6.2 environment in place and it works quite well. I activated ImageMagik and OpenOffice integration for previewing office document but I noticed that the preview component display only ten thumbnails (at maximum) on the left side panel. All the pages are visible in the preview pane (tens, hundreds, ....) but the thumbnails section never contains more than the first ten pages. I can't find any parameter/properties concerning this aspect and I know that, on a different, server the thumbnails are always generated for all pages, not only first ten.
What could be the problem?thanks in advance,Marco
thumbnail
Marco Azzalini, modified 6 Years ago. Regular Member Posts: 146 Join Date: 11/18/14 Recent Posts
I forgot to mention that my Liferay server is an Ubuntu 16.4 . Trying to solve the problem I completely reinstalled Libreoffice and did other debug activities. Every document is transformed and then converted in images and I can browse all pages, but the preview component  never show more than ten thumbnails... This problem is  really making me crazy.... 
Liferay  guys please, give me an hint ;-)
thumbnail
Marco Azzalini, modified 6 Years ago. Regular Member Posts: 146 Join Date: 11/18/14 Recent Posts
I eventually solved! The problem was originated by my Theme. Through CSS rules I made the preview pane little bit higher to better accomodate the majority of business documentation, that has an A4 vertical layout. Unfortunately this lead the preview pane to have an height of more than 700px disabling thus the '<load on demand' features of the thumbnails performed by the preview component.

In that component, the code responsabile for detecting the scrolling down of the thumbnails container have the following line:

[code]if (previewFileCountDown &lt; maxIndex &amp;&amp; imageListContentEl.scrollTop &gt;= (imageListContentEl.scrollHeight - 700)) {
where 700; unfortunately is hard coded

At the moment I don't know how to solve this, a part to modify the component with an EXT plugin, but I am not very confident with it so I reduced the preview pane to be less than 700px and everything works as before.

Hoping this can help someone else.

Marco