使用以下块在 Coldfusion 中创建 PDF,但没有成功:
<cfset FileInputStream = CreateObject("java", "java.io.FileInputStream") >
<cfset File = CreateObject("java", "java.io.File")>
<cfset lic = CreateObject("java", "com.aspose.pdf.License")>
<cfset lic.setLicense(FileInputStream.init(File.init("E:\Tomcat\webapps\openbd\Aspose.Pdf.lic")))>
<cfset Document = CreateObject("java", "com.aspose.pdf.Document").init() >
<cfset demo_pdf = Document.init() >
<cfset Section = CreateObject("java", "aspose.pdf.Section").init() >
<cfset Text = CreateObject("java", "aspose.pdf.Text").init() >
<cfset sec1 = section.demo_pdf.getSections().add() >
<cfset sec1.getParagraphs().add(Text.init("Τέσσερα"))>
<cfset demo_pdf.save("E:\Tomcat\webapps\openbd\HelloWorld.pdf")>
产生的错误是:“java.lang.NoSuchFieldException”在线:“cfset sec1 = section.demo_pdf.getSections().add()”。为了在openBD CFML引擎下使用java aspose PDF lib生成PDF,我应该怎么做?