Exploring the usefulness and possibilities of the Servoy PDF Viewer Component for our NG application, we implemented a first trial to preview Jasper Reports. Displaying the report works fine.
Now it would be nice to hide a shown pane on the left side of the window containing a vertical control (slider for pages?, doesn’t seem to do anything).
Also I would like to control the buttons. In the Servoy API docs I find methods like getToolbarControlIds or setToolbarControlsVisibility, but how to apply them? They do not appear on the pdf_Js_Viewer component.
Further, I would like to control the printing header and footer in the code. Currently, I can do it in the print dialog, but would prefer them to set to uncheck when printing.
Currently, it’s not possible to hide/show the pages panel, just the toolbar button, so if the button is hidden it won’t be possible to show the panel.
The panel itself is useful if the PDF you are displaying has meta info but I think the pages are always generated by the pdf.js library
I guess you can request the feature to hide/show the entire panel
The individual buttons can be controlled once you display a PDF, not before, I am not sure if that’s by design, you can only hide the entire toolbar when no PDF is displayed
elements.pdfViewer.getToolbarControlIds()
``` should return an array of element names so you can do:
3) When you print a PDF (using the print toolbar button) there should not be any header and footer like when you print a web page (print button from the browser)
I hope this helps
Thanks, in our case, the slider oder whatever it is, is not functional, it’s stuck at the bottom and shows 0, regardless of the number of pages the report is showing.
I tried what you suggest, the standard way of accessing methods, but after ```
elements.pdfViewer
3) When the user just prints (by pressing the printer button using the default settings), on the output (paper) print it shows the header and footer, unless I actively uncheck them. But as we don't know what settings are set at customers site and at an individual printer, it would be very helpful to uncheck header and footer programmatically to avoid having a wasted print.
Best regards,