草庐IT

FlyingSaucer

全部标签

java - 使用 FlyingSaucer 将包含阿拉伯字符的 HTML 页面转换为 PDF

我想使用FlyingSaucer将包含阿拉伯字符的HTML页面转换为PDF文件,但生成的PDF不包含组合字符并向后打印输出。HTML:جميعالحقوقJava摘录:StringinputFile="c:\\html.html";Stringurl=newFile(inputFile).toURI().toURL().toString();StringoutputFile="c:\\html.pdf";OutputStreamos=newFile

java - 带有阿拉伯语文本的 FlyingSaucer LTR/RTL/BiDi 问题

我正在使用飞碟xhtmlrenderer构建pdf文档。到目前为止一切正常——现在我们应该在pdf中生成阿拉伯语文本。Xhtmlrenderer正在以相反的顺序呈现阿拉伯文本。我在互联网上的某个地方(也许在他们自己的网站上)读到xhtmlrenderer不支持bidi/rtl。但IText本身包含通过ColumnText和PdfPTable使用阿拉伯语和希伯来语的示例(源可以在这里找到:http://sourceforge.net/projects/itextpdf/files/Examples/examples-155/examples-155.zip/download-arabic

java - FlyingSaucer renderer.setDocument 抛出 "Stream closed"异常

我在使用找到的简单示例创建PDF时遇到问题here.这是我第一次尝试使用它,我尝试了一些东西并进行了大量搜索,但没有找到产生错误的原因。错误源自renderer.setDocument(url);行。如果有人有任何想法、建议或替代方案,我们将不胜感激。packageflyingsaucerpdf;importjava.io.*;importcom.lowagie.text.DocumentException;importorg.xhtmlrenderer.pdf.ITextRenderer;publicclassFirstDoc{publicstaticvoidmain(String[