When importing the service in a controller the service needs to be named PdfRenderingService but when using in the controller action it must be pdfRenderingService
class SystemController {
def PdfRenderingService
def compose_one_for() {
if (!params?.id) params.id = 1
def customer = Customer.findById(params.id)
pdfRenderingService.render(template: "/pdfs/firstLetter", model:[customer:customer], response)
}
}
When changing the capitalization of pdfRenderingService in one case it wont work.