We are using the pdf.js component in our application. The strange thing is that when you hover over the icon to get the preview window – it retrieves the document again – you can see the progress bar going in the preview window. I think this is not good as some of the documents are large and its making another trip to the server to get it. Why does it need to refresh the window again – I was under the assumption that the preview window was just a “screen capture” static image of the window.
Pdf files may be web optimized and loaded in ranges. Meaning that the viewer only loads the first page and then loads the pages as requested by the viewer.
The native pdf viewer (Adobe) supports and it appears to be supported by pdfjs too. It requires some extra work in the handler in case your app serves the content. Otherwise IIS handles range requests for you if you serve the web optimized pdf file as a full URL.
Another solution may be to hide the pdf viewer when minimized and replace with an image of your choosing – I haven’t tried it.
It’s normal behavior. The preview windows is a deep clone of dom elements, scaled down using css. The dom elements are rendered by the browser and the cache, etc.
Screen grabbing doesn’t exist in any browser. You either clone the elements or rebuild each one on a html5 canvas element usign drawing calls.
Please login first to submit.