我使用Spring Boot和FOP生成PDF并发送回UI组件。当我使用"mvn spring- Boot : run“运行Spring boot应用程序时,一切正常(PDF是动态生成的,并在UI中呈现),但是,如果我将这个spring boot应用程序打包到一个jar中,并通过"java -jar xxx.jar”运行它,我遇到了由FOP引发的以下错误:
java.lang.IllegalArgumentException: URI is not absolute
at java.net.URI.toURL(URI.java:1088)
at org.apache.fop.f
我是fop-newbie,愿意使用Apache FOP生成PDF,如下所述
[ Imagine A4 page has dimensions 800pt x 600pt. The top 200pt x 600 pt will
hold a image and some meta data about the entity. The space below this region
needs to contain the description, but in two-column format (like newspapers).
Sometimes description is so-b
我需要使用Apache进行XSL转换,我的代码如下所示:
//Setup FOP
Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, out);
//Setup Transformer
Source xsltSrc = new StreamSource(new File(xslPath));
Transformer transformer = tFactory.newTransformer(xsltSrc);
//Make sure the XSL transformation's result is piped through t
在带有连接包的FopFactory中,我使用了以下代码-- IKVM和FOP:
using org.apache.fop.tools;
using org.apache.fop.apps;
using org.xml.sax;
using java.io;
public void PDF(MemoryStream inpFile, string pdfFile)
{
OutputStream os = new BufferedOutputStream(new FileOutputStream(new java.io.File(pdfFile)));
try
{
我在java程序中嵌入了fop:
public class run {
public static void main(String [ ] args){
FopFactory fopFactory = FopFactory.newInstance();
OutputStream out = null;
try {
out = new BufferedOutputStream(new FileOutputStream(new File("F:/test.pdf")));
} catch (FileNotFoundExcep
我试图用ApacheFOP2.2生成PDF,遇到了一些问题,我使用的是完整的URI,如
file:///Users/mac/Desktop/image.png。
这里是myTemplate的一部分。
<fo:block>
<fo:external-graphic content-height="scale-to-fit" content-width="46.0mm"scaling="non-uniform" src="(here I put the upper URI)"/>
</fo
我正在使用apache fop生成pdf .I我尝试使用barcode4j将条形码集成到我的pdf中,但它不起作用。我对fop.bat进行了以下更改
set LOCALCLASSPATH=%LOCAL_FOP_HOME%build\fop.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;'D:\xmlfo\src\ac\barcode4j-2.0\build\barcode4j-fop-ext.jar'