[jira] [Commented] (FOP-2523) Behavior change in include path handling breaks existing 1.1 docs
[ https://issues.apache.org/jira/browse/FOP-2523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15862925#comment-15862925 ] Johan Persson commented on FOP-2523: The solution to fix the changed behavior of fop 2.x is to make sure there is a correct configuration file. It seems that fop 1.0 had different default values for the "base" URI. To solve this problem one only has to setup a minimum fop configuration file as: ./ and the run fop with the "-c" option to specify this config file unless one puts it in one of the default location where fop looks for it. Will close this issue as it is not an issue (perhaps it should be mentioned in some "gotchas" when moving from fop 1.1 to fop 2.x) > Behavior change in include path handling breaks existing 1.1 docs > - > > Key: FOP-2523 > URL: https://issues.apache.org/jira/browse/FOP-2523 > Project: FOP > Issue Type: Bug > Components: image/jpeg, image/png >Affects Versions: 2.0 > Environment: OS X , Linux >Reporter: Johan Persson >Priority: Minor > Labels: path > > When transforming a document with included files (images) there is a > different behavior between 1.1 and 2.x. > Transformation that works with fop 1.1 no longer works with 2.0 > I suspect that this is not so much a bug as a change that breaks existing > build schemas due to fop making different assumption on relative paths in 1.1 > compared with 2.x. but I have to yet figure out what the assumption is. > If the generated .fo includes say, > {{}} > If all files (both images and .fo) are in a flat directory this works well > with 1.1. Running the same source through 2.0 will generate an error saying > that FOP cannot find the referred file (myimage.jpg) > I suspect this is a common enough pattern to warrant some notice on how to > handle this situation. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (FOP-2523) Behavior change in include path handling breaks existing 1.1 docs
[ https://issues.apache.org/jira/browse/FOP-2523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15762797#comment-15762797 ] Graeme Wellington commented on FOP-2523: My environment is: Java: jdk1.8.0_111 (64bit) Tomcat 8.0.15 FOP 1.1 FOP 2.1 I have installed the source for FOP-1.1 and FOP-2.1 and compiled using ANT. I am testing the XML/XSL PDF generation with a basic XML file and a basic Stylesheet with 1 Command Line FOP-1.1: "C:\fop-2.1\fop.bat" -xml "C:\Temp\42236-050-5002-ELITES-ITEM HIRE.xml" -xsl "C:\Temp\BT-PO-SA-ALL.xsl" -pdf "C:\Temp\42236-050-5002-ELITES-ITEM HIRE.pdf" Successfully generates PDF FOP-2.1: "C:\fop-2.1\fop.bat" -xml "C:\Temp\42236-050-5002-ELITES-ITEM HIRE.xml" -xsl "C:\Temp\BT-PO-SA-ALL.xsl" -pdf "C:\Temp\42236-050-5002-ELITES-ITEM HIRE.pdf" Successfully generates PDF Servlet === I loaded the FOP-1.1 fop.war into Tomcat and run the following from IE11: http://localhost:8500/fop/fop?xml=C:/temp/PO-ELITES-22240-050-5002.xml=C:/temp/BT-PO-SA-ALL.xsl Successfully rendered PDF to the browser I then loaded the FOP-2.1 fop.war into Tomcat and run the same command from IE11: http://localhost:8500/fop/fop?xml=C:/temp/PO-ELITES-22240-050-5002.xml=C:/temp/BT-PO-SA-ALL.xsl This fails with a HTTP error similar to: HTTP Status 500 - javax.xml.transform.TransformerException: org.xml.sax.SAXException: The resource path [file:C:///Temp/logo.jpg] is not valid Followed by a long Exception audit. If I remove the 1 line where a graphic is referenced with 'fo:external-graphic' then the PDF generates ok obviously without the logo. I have tried various ways to define the source but no luck including: I have also tried relative paths but no luck. >From what I have researched it looks like the problem relates to changes in >the method used to resolve a URI / URL. Graeme Wellington graeme.welling...@ptbuildingsolutions.com.au > Behavior change in include path handling breaks existing 1.1 docs > - > > Key: FOP-2523 > URL: https://issues.apache.org/jira/browse/FOP-2523 > Project: FOP > Issue Type: Bug > Components: image/jpeg, image/png >Affects Versions: 2.0 > Environment: OS X , Linux >Reporter: Johan Persson >Priority: Minor > Labels: path > > When transforming a document with included files (images) there is a > different behavior between 1.1 and 2.x. > Transformation that works with fop 1.1 no longer works with 2.0 > I suspect that this is not so much a bug as a change that breaks existing > build schemas due to fop making different assumption on relative paths in 1.1 > compared with 2.x. but I have to yet figure out what the assumption is. > If the generated .fo includes say, > {{}} > If all files (both images and .fo) are in a flat directory this works well > with 1.1. Running the same source through 2.0 will generate an error saying > that FOP cannot find the referred file (myimage.jpg) > I suspect this is a common enough pattern to warrant some notice on how to > handle this situation. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FOP-2523) Behavior change in include path handling breaks existing 1.1 docs
[ https://issues.apache.org/jira/browse/FOP-2523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15183173#comment-15183173 ] simon steiner commented on FOP-2523: Related to FOP-2306 maybe > Behavior change in include path handling breaks existing 1.1 docs > - > > Key: FOP-2523 > URL: https://issues.apache.org/jira/browse/FOP-2523 > Project: FOP > Issue Type: Bug > Components: image/jpeg, image/png >Affects Versions: 2.0 > Environment: OS X , Linux >Reporter: Johan Persson >Priority: Minor > Labels: path > > When transforming a document with included files (images) there is a > different behavior between 1.1 and 2.x. > Transformation that works with fop 1.1 no longer works with 2.0 > I suspect that this is not so much a bug as a change that breaks existing > build schemas due to fop making different assumption on relative paths in 1.1 > compared with 2.x. but I have to yet figure out what the assumption is. > If the generated .fo includes say, > {{}} > If all files (both images and .fo) are in a flat directory this works well > with 1.1. Running the same source through 2.0 will generate an error saying > that FOP cannot find the referred file (myimage.jpg) > I suspect this is a common enough pattern to warrant some notice on how to > handle this situation. -- This message was sent by Atlassian JIRA (v6.3.4#6332)