Niklas created FOP-3370:
---------------------------
Summary: Avoid converting inline XML objects (e.g. SVG) to bytes
in PreloaderWMF
Key: FOP-3370
URL: https://issues.apache.org/jira/browse/FOP-3370
Project: FOP
Issue Type: Improvement
Reporter: Niklas
When a document has an inline SVG (fo:instream-foreign-object), FOP asks the
image readers ("preloaders") what kind of image it is. One of them is the WMF
reader PreloaderWMF.
The WMF reader aks for the image as bytes. Because FOP holds an inline SVG as
an XML tree in memory, the whole tree is converted to text first. The WMF
reader then sees that it is not a WMF file and says no. The converted bytes are
thrown away, and the SVG reader never needs them.
WMF is a binary format, so an XML tree can never be a WMF file.
Attached is a patch that skips the useless conversion, once for every inline
SVG.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)