这很奇怪,方法parseXHtml被重载并且存在参数列表(PdfWriter,Document,InputStreamReader,InputStreamReader)。我检查过javadoc,反编译jar等等,它就在那里!但是eclipse只是没有加载正确的那个!
XMLWorkerHelper类型中的方法parseXHtml(PdfWriter,Document,InputStream,Charset)不适用于参数(PdfWriter,Document,InputStreamReader,InputStreamReader)
public void parseXHtml(PdfWriter writer, Document doc, InputStream in, InputStream inCssFile) throws IOException
{
parseXHtml(writer, doc, in, inCssFile, null, ((FontProvider) (new XMLWorkerFontProvider())));
}
答案 0 :(得分:1)
parseXHtml
的最后两个参数分别为InputStream
和Charset
类型:
parseXHtml(PdfWriter, Document, InputStream, Charset)
将方法参数更改为:
public void parseXHtml(PdfWriter writer, Document doc, InputStream in, Charset charset) throws IOException
{
...
}