Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in docs about save to File #10

Open
wanswins opened this issue Apr 5, 2013 · 0 comments
Open

Error in docs about save to File #10

wanswins opened this issue Apr 5, 2013 · 0 comments

Comments

@wanswins
Copy link

wanswins commented Apr 5, 2013

Hi guys,

There's an error in documentation related to save PDF directly to a File. In chapter 3 'Rendering' on the second example box, one parameter is missing resulting in save a blank PDF. Here is the correct version. Otherwise it render a blank PDF...

// Get the bytes
def bytes = gifRenderingService.render(template: '/images/coupon', model: [serial: 12345])
// Render to a file
new File("coupon.jpg").withOutputStream { outputStream ->
jpegRenderingService.render([template: '/images/coupon', model: [serial: 12345]],outputStream)
}

I use this plugin for almost 3 years now for all embedded reports I need to do. It's really awesome.

Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant