Project

General

Profile

Defect #619

Page margins and page size wrong when printing

Added by Sem Tukenmez over 11 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
12/31/2012
Due date:
% Done:

0%

Estimated time:
Browser (if web client):

Description

When printing a report from the viewer or silently, the page margins and page size is not correct.
Also, with multi-page reports the first page is printed in portrait (as we've set) but from the second page on it prints in landscape.

We have set our CSS @page as follows and the printParams are set to A4, Portrait.

@page {
size: A4 portrait;
margin-top: 1.5cm;
margin-bottom: 5cm;
margin-left: 1.5cm;
margin-right: 1.5cm;

@top-right {
content: element(topheader) "Page " counter(page) " of " counter(pages);
font-family: sans-serif;
font-size: 9pt;
}
@bottom-left {
content: element(footer);
font-family: sans-serif;
font-size: 9pt;
}
}

This did work in the past (we were on version 2.0.12 I think, but have to check to be sure), we've just updated to 3.0RC7 and it doesn't work correctly anymore.

We did try setting other @page settings, like setting the width and height explicitly. Also tried addDefaultReportParameter("printParams",printParamsObject). But that didn't help.
It happens both in developer and from a production server.

History

#1

Updated by Patrick Talbot over 11 years ago

It might well be that the updated CSS parser (the one used and deployed with Servoy 6.1+) has introduced this bug.
I'll need to dig a little bit to fix this one.

#2

Updated by Sem Tukenmez about 11 years ago

I was wondering if there was any update on this?

Regarding the possibility that it could be the Servoy CSS parser, I've also tried to escape the @ symbol in the css (we had to escape symbols like ':' in the latest Servoy version), but unfortunately that didn't work also.

Please let me know if I could be of any help in resolving this issue.

#3

Updated by Patrick Talbot about 11 years ago

Totally forgot about this one, sorry.

I need to do some work on Velocity soon, adding mime/multipart request support for services (in and out) so I'll have a look at that as well.

#4

Updated by Patrick Talbot about 11 years ago

  • Status changed from New to Closed

Fixed with 3.1b02 - the fix is in the PDFRenderer.jar that has been patched with a fix for this bug.
You can eventually overwrite this jar using the 3.1b02 version, this will work in 3.0 as well.

#5

Updated by Sem Tukenmez about 11 years ago

Fantastic news! Thank you for this patch

#6

Updated by Patrick Talbot about 11 years ago

Sorry about the delay. Took me a while, but I had to dig deep in the PDFRenderer lib and actually patch it and build it myself.

Also available in: Atom PDF