Project

General

Profile

Defect #695

print settings not transported to printer

Added by Jos de Bruijn almost 12 years ago. Updated over 11 years ago.

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

0%

Estimated time:
Browser (if web client):

Description

I've modified the @page settings to use:

    <style type="text/css" media="print">
    @page { size: A4 landscape; }
    </style>

When I show this in the preview component (smartclient) then it shows the data in landscape mode. But when I press the print button the page properties are set to portrait.

History

#1

Updated by Patrick Talbot almost 12 years ago

Always match the printParams properties with the @page setting:

var orientationType = 'landscape'; || 'portrait'
var orientation;
if (orientationType == 'landscape') {
   orientation = plugins.VelocityReport.PRINTORIENTATION.LANDSCAPE;
} else {
   orientation = plugins.VelocityReport.PRINTORIENTATION.PORTRAIT;
}
var params = {showDialog: false, size: plugins.VelocityReport.PRINTSIZE.ISO_A4, orientation: orientation};

// if you want to print from the viewer, set this as a defaultReportParameter:
plugins.VelocityReport.addDefaultReportParameter('printParams', params);

// if you are printing from Servoy, do:
plugins.VelocityReport.printReport(yourTemplate, context, params);

#2

Updated by Patrick Talbot almost 12 years ago

  • Status changed from New to In Progress

Let me know if adding printParams work in your case, if so I'll close the bug, if not, I'll investigate further...

#3

Updated by Patrick Talbot over 11 years ago

  • Status changed from In Progress to Closed

No news is good news I suppose... so I'll close the bug. If you experience this issue after using printParams, feel free to reopen with steps to reproduce

Also available in: Atom PDF