Project

General

Profile

Defect #256

Viewer printPreview property wrong way round?

Added by Patrick Ruhsert about 13 years ago. Updated about 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
03/28/2011
Due date:
% Done:

0%

Estimated time:
Browser (if web client):

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

#1

Updated by Patrick Talbot about 13 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 ?

#2

Updated by Patrick Talbot about 13 years ago

  • Status changed from In Progress to Closed

Fixed in v1.4.9

Also available in: Atom PDF