I am converting XML to PDF using Apache. I am executing the FOP command line as batch file( since the input file will be vary) from Perl as like below:
Creating Batch file:
open (OUT2, '>', 'c:\test\fop-1.0\run.bat');
print OUT2 "cd\\\ncd c:\\test\\fop-1\.0\\\n C:\\test\\fop-1\.0\\fop\.bat -c C:\\test\\fop-1\.0\\conf\\fop-config\.xml -xsl C:\\test\\fop-1\.0\\test.xsl -xml c:\test\document2.xml -pdf c:\test\document2.pdf";
close (OUT2);
Executing batch file using system command:
$cmd2 ="c:\\test\\fop-1.0\\test.bat";
system("$cmd2");
I am embedding the svg files in the fop. I am getting the output when I run batch file manually, but by executing from perl I am getting the following error:
org.apache.fop.image.loader.batik.PreloaderSVG$Loader ge...
Can anyone help me to resolve this problem?
尝试类似
system "cmd","/c","c:\\test\\fop-1.0\\test.bat";
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.