2013-04-02 111 views
0

我在itext pdf上工作时,我扩展了一个PdfPageEventHelper类,它显示下面的错误。itext pdf在tapestry

Base class com.lowagie.text.pdf.PdfPageEventHelper (super class of 
de.fu_berlin.inf.klausurenportal.pages.question.TableHeader) is not in a controlled package 
and is therefore not valid. You should try moving the class to package 
de.fu_berlin.inf.klausurenportal.base. 
+0

包名中包含我的名字(Lowagie)的类已过时,不应再使用。请升级到更新的iText版本。 –

回答

0

看来你的部件是从com.lowagie.text.pdf.PdfPageEventHelper类,它是不是挂毯控制包内延伸。所有tapestry5组件和页面的超类应放置在root.base包中。

http://tapestry.apache.org/component-classes.html#ComponentClasses-ComponentPackages

但你可以实现PdfPageEvent接口来代替。您甚至可以在root.base包中创建类似PdfPageEventHelper类的内容并对其进行扩展。

但是你真的需要在你的组件中使用这个类吗?您可以使用PdfPageEvent作为单独的课程,例如作为页面的内部类或作为实用程序类。