rogiller
rogiller

Reputation: 895

JasperReports page size scaling

Does anyone know if there is a tool out there for scaling a JasperReports report up or down to fit different page sizes? The scenario is say I create & layout all my reports in the LETTER size. I want to be able to change to say size A4 on the fly and have all the elements adjust accordingly in width & X position.

Right now I'm writing my own code to do the scaling but I wanted to put this out there in case somebody knows of a tool or something in the JasperReports framework that I can use.

UPDATE

I created an open source project for JasperReport scaling: https://github.com/flex-rental-solutions/jasper-reports-scaler

It's still fairly primitive but we use it in our app successfully. I'd be delighted to see it grow from community support.

Upvotes: 1

Views: 3141

Answers (1)

M. Shaibi
M. Shaibi

Reputation: 11

open the report with xml or text editor and add these two lines:

<Page width> 210mm </Page width>

<Page Hieght> 297mm </Page Hieght>

after this line:

`<Page>`

Upvotes: 1

Related Questions