Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Online document viewer component
Today we here ( in Russia ) have a working day, so I'll threat this as a community Saturday, not Friday :)
If anyone interested - here is a preview of one new feature from upcoming 1.1.0 version of the Toolkit Productivity Tools package - an online document viewer.
It is capable to display very large PDF documents online without any acrobat plugin and of course, without downloading the source DPF file. Was tested fine with a 1.5 GB, 1000 pages 300 dpi scanned book.
The component in it's current version is baed on a Vaadin Table component and does not use any custom client-side widgets.
You can take a look at the demo here - http://demo.stor-m.ru/tpt-demo , go to "Online Document Viewer" tab (most right one). It displays the TPT's manual as default but you're free to upload your own pdf files as well. Please do not upload gigabyte files, however, as we have a limited bandwidth on this server.
The component is pure pdf renderer, so it dows not have any UI buttons for zoom,etc... it is left to component user, but I'll add a demo toolbar into the demo in the release version of TPT.
For now component displays the PDF files in a Google's book reader manner, but to release version there shoud be another two viewe modes - dual page and thumbnails.
So, hope you'll like this. Any ideas/bugs/wisges/etc are welcome as usual :)
Wow. This is really impressive. I am surprised that Table can be used for something like this.
What are you using for converting PDF pages to JPG:s?
Table is just a wonderful component, its lazy loading feature, combined with the custom column renderer produces wide possibilities for displaying big contents fast. In this case, custom renderer is just an Embedded component which displays a page image from a custom stream resource.
At the server side, IcePDF is used to dynamically extract rasterized presentations of a pdf page with the requested scale and transformation. This engine is quite fast and capable of walking the pdf document without loading it into the memory, so even gigabyte pdf files are opened in seconds.
But actually the viewer API does not tie to PDF only, it provides a DocumentRasterProvider interface instead which could be implemented to provide support for any other formats.
Wow! TPT feels even better, the documentation is great!
Now I'm just wondering which project is more suitable for my needs: TPT or Kim's new VaadinAppFoundation :)
Hi:
the last update of TPT says that the Document Viewer package and its deps were separated to a different project....is it a new add-on?...if so, which one??
regards,
Hugo
Hi, Hugo.
Thanks for your nice sharing. As for me, I have seldom tried to dynamically extract rasterized presentations of a pdf page with the requested scale and transformation before. Have you ever worked it out? I wonder whether you have any exprience about pdf extraction process. Because there is something wrong with my pdf reader. I need convert pdf into text or other formats. Any suggestion will be appreciated. Thanks in advance.Best regards,
Pan