Good afternoon.
We have a requirement to preview a PDF file.
For that, we are using the documentViewerField component (green circle).Both the documentViewerField component and the other components displayed in the image are inside a cardLayout.However, there is a lot of space (blue box) because of the height occupied by the documentViewerField and we want to avoid that space, making the documentViewerField component occupy exactly the same height as the rest of the components, to avoid the large space that is displayed (blue box) and that the resulting space is only the space occupied by the yellow box. We want to display pdf files in thumbnail and at the same time we want the thumbnail to be adjustable to the box we have in yellow, to avoid that space (blue box).
On the other hand, is it possible, somehow, to make that with some click we can have a thumbnail in a larger viewer and be able to download the document.
Does anyone know any way to do this, or any component or plugin that fits the requirements explained?
Thank you very much.
Discussion posts and replies are publicly visible
The answer unfortunately is that you won't find there's a lot of control over how the document viewer field formats the displayed document after its relative width is set by whatever column you have it in. The one helpful thing I can offer is that you could potentially allow the User to "move" the display around to different areas on the form by clicking various icons / buttons you place in pertinent spots, which can set the values of local variables that then determine the display behavior of the field - so for instance a user could click an arrow that moves the document out of the narrow left panel and into the "main" panel, and later they could click a different icon to move it back.
For what it's worth, my normal convention to show PDFs in the document viewer field is to show it in a separate section below the main contents of a form, since it usually requires the user scrolling down and then scrolling inside the PDF, no matter what else you do. And as I said, the control we have here is pretty limited, partly due to the inherent nature of PDFs and trying to view them inside a browser window.