Groovy - need to make a printable form

戏子无情 提交于 2019-12-12 02:03:49

问题


Probably need title help as I mean a literal paper form, not an HTML element. I have this PDF form I email everyone after they use my site, and I have to manually enter a couple fields the database knows. I am looking for a good method to have Groovy make a pdf or something like that.

What I am going to attempt: Make the form in Word, save as XML, put XML as groovy String and ${someVariable} everywhere I need filled in. Open XML in Word and then print as PDF.

Is there a better way? I have Acrobat, but if there is a way without it that's even better.

I am running into a problem which I will ask as a separate question, so get ready for a link hereish. UPDATE: Groovy says my Unicode string is too long

iText is not an option until they get back to me Re: licensing which also excludes the plugin Jared mentions (it is based on iText).

Apache thing seems to be about as hard to learn as making my rube goldberg...


回答1:


I haven't used this but take a look at the PDF Plugin It looks like you can create a standard grails view containing the info you want and generate a PDF from it. I wish I had used this for my PDF generation needs.



来源:https://stackoverflow.com/questions/6835479/groovy-need-to-make-a-printable-form

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!