ich versuche, von gsp zu konvertieren mit this pluginGrails Rendering-Plug-In mit Grails 3.1.1
to pdf, aber ich noch einige Fehler wie dieser
java.lang.NullPointerException: null
at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1337) ~[na:1.8.0_131]
at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1197) ~[na:1.8.0_131]
at java.beans.Introspector.getBeanInfo(Introspector.java:426) ~[na:1.8.0_131]
at java.beans.Introspector.getBeanInfo(Introspector.java:173) ~[na:1.8.0_131]
at grails.plugins.rendering.document.RenderEnvironment.init(RenderEnvironment.groovy:31) ~[rendering-2.0.3.jar:na]
at grails.plugins.rendering.document.RenderEnvironment.with(RenderEnvironment.groovy:68) ~[rendering-2.0.3.jar:na]
at grails.plugins.rendering.document.RenderEnvironment.with(RenderEnvironment.groovy:60) ~[rendering-2.0.3.jar:na]
at grails.plugins.rendering.document.XhtmlDocumentService.generateXhtml(XhtmlDocumentService.groovy:65) ~[rendering-2.0.3.jar:na]
at grails.plugins.rendering.document.XhtmlDocumentService.createDocument(XhtmlDocumentService.groovy:35) ~[rendering-2.0.3.jar:na]
bekommen dies ist mein Code.
def createPdfReport = {
def cif = corporateUserService.getCurrentCifUser().cif
def perintahkerjaIns = PerintahKerja.findByCifAndId(cif,params.id)
def perintahkerjaDets = PerintahKerjaDetail.findAllByPerintahKerja(perintahkerjaIns,[sort:"pohon",order:"asc"])
def perintahpekerja = PerintahPekerja.findAllByPerintahKerja(perintahkerjaIns)
renderPdf(template: '/perintahKerja/templatprintperintahkerja',model: [jumlahpohon: perintahkerjaDets.size(), cif: cif, perintahLerjaInstance:perintahkerjaIns, perintahKerjaDetails:perintahkerjaDets, perintahPekerjaList: perintahpekerja], filename: "PerintahKerja")
}
ich weiß nicht, was ich verpasst habe.
hallo, Ihre Lösung war groß, aber sind Sie wissen, wie es auf „Lanscape“? – akiong
Nicht sicher, vielleicht spielen mit der CSS-Größe http://gpc.github.io/rendering/guide/single.html#4.%20Size –
ich bereits css auf Landschaft 'size: landscape;' aber beim Export in PDF , noch potrait – akiong