Skip to content

Error in docs about save to File #10

@wanswins

Description

@wanswins

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions