Defect #619
Page margins and page size wrong when printing
0%
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
Updated by Patrick Talbot over 12 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.
Updated by Sem Tukenmez about 12 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.
Updated by Patrick Talbot about 12 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.
Updated by Patrick Talbot about 12 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.
Updated by Patrick Talbot about 12 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.