Defect #256
Viewer printPreview property wrong way round?
0%
Description
I want to show the viewer in printPreview mode. I do this
var vViewer = plugins.VelocityReport.previewReport(vTemplate, vContext);
vViewer.setPrintCallbackFunction(printVelocityReport_createPDF);
vViewer.printPreview = true;
That shows the viewer in non preview mode. If I set the property to false, it works as I want (except for the preview button is not "pressed").
History
Updated by Patrick Talbot about 14 years ago
- Status changed from New to In Progress
You are right.
The value is doing the inverse of what is intended, and the toggle button is not updated accordingly.
I have corrected that, it will be available in the next release.
Know that there is also another way to achieve what you want: use a defaultPreviewParameter.
For example:
plugins.VelocityReport.addPreviewParameter('openInPaginated', true);
Actually this is better because if you do it on the viewer like in the code snippet you wrote here, the change is done after the viewer is opened, while setting the defaultPreviewParameter will directly open the viewer in the correct mode.
Just realized it was missing in the FAQ, which is now corrected: see What are the default preview parameters ?
Updated by Patrick Talbot about 14 years ago
- Status changed from In Progress to Closed
Fixed in v1.4.9