[ https://issues.apache.org/jira/browse/FOP-3095?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17628835#comment-17628835 ]
Simon Steiner commented on FOP-3095: ------------------------------------ due to: parser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); > External SVG used to work but doesn't now > ----------------------------------------- > > Key: FOP-3095 > URL: https://issues.apache.org/jira/browse/FOP-3095 > Project: FOP > Issue Type: Bug > Components: foreign/svg, image/svg > Affects Versions: 2.5, 2.2, 2.3, 2.4, 2.6, 2.7 > Environment: fop CLI in kubuntu 20.04 > Reporter: Fret Net > Priority: Major > > The example at examples/fo/svg/external.fo used to work (v2.1, 2.0) but now > fails. This has been reported in issue [FOP-3070]. The resolution there was > to remove the example file. > It would be useful if this functionality still worked. A typical line from > the example file is: > <fo:external-graphic src="file:boxes.svg"/> > I used this command: > {color:#000000}fop external.fo external.pdf{color} > Running the CLI gives (excerpt): > {color:#000000}Sep. 29, 2022 2:45:48 PM > org.apache.fop.events.LoggingEventListener processEvent {color} > SEVERE: Image not available. URI: file:boxes.svg. Reason: > org.apache.xmlgraphics.image.loader.ImageException: The file format is not > supported. No ImagePreloader found for file:boxes.svg (See position 63:44) > org.apache.xmlgraphics.image.loader.ImageException: The file format is not > supported. No ImagePreloader found for file:boxes.svg > at > org.apache.xmlgraphics.image.loader.ImageManager.preloadImage(ImageManager.java:181) > > at > org.apache.xmlgraphics.image.loader.cache.ImageCache.needImageInfo(ImageCache.java:127) > > at > org.apache.xmlgraphics.image.loader.ImageManager.getImageInfo(ImageManager.java:123) > > at > org.apache.fop.fo.flow.ExternalGraphic.bind(ExternalGraphic.java:81) > at org.apache.fop.fo.FObj.processNode(FObj.java:131) > at > org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:321) > > at org.apache.fop.fo.FOTreeBuilder$2.run(FOTreeBuilder.java:185) > at org.apache.fop.fo.FOTreeBuilder$2.run(FOTreeBuilder.java:182) > at java.base/java.security.AccessController.doPrivileged(Native > Method) > at > org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:181) > at > org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1073) > > at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown > Source) > at > org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown > Source) > at org.apache.xerces.xinclude.XIncludeHandler.emptyElement(Unknown > Source) > at > org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown > Source) > at > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown > Source) > at > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown > Source) > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) > at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown > Source) > at > org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485) > > at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:293) > at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:116) > at org.apache.fop.cli.Main.startFOP(Main.java:183) > at org.apache.fop.cli.Main.main(Main.java:214) > -- This message was sent by Atlassian Jira (v8.20.10#820010)