batik svg转pdf异常 org.apache.batik.bridge.BridgeException: null:0

resolve /data/xx.jpg
[ERROR] Transcoder - null
Enclosed Exception:
Unable to make sense of URL for connection
[ERROR] Transcoder - null
Enclosed Exception:
Image not found: /data/xx.jpg
org.apache.batik.bridge.BridgeException: null:0
The URI "/data/xx.jpg"
on element  can't be opened because:
The URI can't be opened:
Unable to make sense of URL for connection
	at org.apache.batik.bridge.UserAgentAdapter.getBrokenLinkDocument(Unknown Source)
	at org.apache.batik.bridge.SVGImageElementBridge.createBrokenImageNode(Unknown Source)
	at org.apache.batik.bridge.SVGImageElementBridge.createImageGraphicsNode(Unknown Source)
	at org.apache.fop.svg.AbstractFOPImageElementBridge.superCreateGraphicsNode(AbstractFOPImageElementBridge.java:132)
	at org.apache.fop.svg.AbstractFOPImageElementBridge.createImageGraphicsNode(AbstractFOPImageElementBridge.java:119)



这个错误是svg引用了图片引起的,在每个引用图片url前面加 file:

你可能感兴趣的:(java,web,异常)