How to scale/zoom report embedded through visualize.js

I have a report embedded in a web page bit it has a fixed width of 575px, and the text is too small to see clearly. I thought an embedded report would resize itself into it's container. Is this dependent on how the report is designed?

The rendered size does seem to match the 100% size shown if I run the same report in Jasper Reports Server, but does the javascript API offer any control over the zoom?

I have fudged it by adjusting the transform scale property of the jrPage table after the report completes, and this works to a point but:

a) if the page is resized the report renders back to 100% - AFTER any code I attach to the window resize event.

b) interactivity is compromised while the scaled report is shown - eg. if I try to resize a column it shows the original width not the scaled width.


jeremy.bradshaw_1's picture
Joined: Jul 3 2015 - 3:58am
Last seen: 6 years 8 months ago

2 Answers:

JSFiddle examples below may help you:

Disable autoresize and resize report manually -

Fit report to container -
You may need to change URL in the second example.

asimkin's picture
Joined: Jun 16 2014 - 6:30am
Last seen: 1 year 10 months ago

Visualize.js just renders the report in the <div>. You can use jQuery UI to change the effects.

hozawa's picture
Joined: Apr 24 2010 - 4:31pm
Last seen: 3 years 3 months ago