Java FlyingSaucer将setNamespaceAware设置为false

Java FlyingSaucer将setNamespaceAware设置为false,java,pdf-generation,flying-saucer,Java,Pdf Generation,Flying Saucer,编译将html转换为pdf的PDFRender类时,我得到了“文件过早结束”: 我想在这个代码段中使用setNamespaceAware设置为false,但是我的代码没有使用DocumentBuilderFactory DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); documentBuilderFactory.setNamespaceAware(false);

编译将html转换为pdf的PDFRender类时,我得到了“文件过早结束”:

我想在这个代码段中使用setNamespaceAware设置为false,但是我的代码没有使用DocumentBuilderFactory

DocumentBuilderFactory documentBuilderFactory =     DocumentBuilderFactory.newInstance();
documentBuilderFactory.setNamespaceAware(false);
我该怎么做

DocumentBuilderFactory documentBuilderFactory =     DocumentBuilderFactory.newInstance();
documentBuilderFactory.setNamespaceAware(false);