Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-3095

External SVG used to work but doesn't now

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • 2.5, 2.2, 2.3, 2.4, 2.6, 2.7
    • None
    • foreign/svg, image/svg
    • None
    • fop CLI in kubuntu 20.04

    Description

      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:

      fop external.fo external.pdf

      Running the CLI gives (excerpt):

      Sep. 29, 2022 2:45:48 PM org.apache.fop.events.LoggingEventListener processEvent
      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)

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            fretnet Fret Net
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: