[ 
https://issues.apache.org/jira/browse/FOP-2842?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Simon Steiner updated FOP-2842:
-------------------------------
    Fix Version/s:     (was: 2.3)

> Incompatibility between Batik / FOP / TwelweMonkey's ImageIO / 
> <fo:instream-foreign-object> tag
> -----------------------------------------------------------------------------------------------
>
>                 Key: FOP-2842
>                 URL: https://issues.apache.org/jira/browse/FOP-2842
>             Project: FOP
>          Issue Type: Bug
>            Reporter: Martin Hajduch
>            Priority: Major
>         Attachments: exception.txt
>
>
> Please see also: [https://github.com/haraldk/TwelveMonkeys/issues/476]
> When using Batik 1.11 / FOP 2.3 / TwelweMonkey's ImageIO 3.4.1, 
> <fo:instream-foreign-object> with embedded SVG image does not work correctly.
> What happens is, that org.apache.fop.render.intermediate.AbstractIFPainter 
> class creates ImageInfo object with URI being null, through this piece of 
> code:
> {quote}protected void drawImageUsingDocument(final Document doc,
>          final Rectangle rect) {
>      final ImageManager manager = getFopFactory().getImageManager();
>      ImageInfo info = null;
>      try {
>          info = manager.preloadImage({color:#d04437}*null*{color}, new 
> DOMSource(doc));
> {quote}
>  
> This subsequently failes in FOP's InternalResourceResolver, which contains 
> code:
> {quote}public Resource getResource(String stringUri) throws IOException, 
> URISyntaxException {
>      if ({color:#d04437}*stringUri.startsWith*{color}("data:"))
> -Unknown macro:- \{         return new Resource(resolveDataURI(stringUri));   
>       }
>     return getResource(cleanURI(stringUri));
>  }
> {quote}
>  
> This obviously cannot work if stringUri is null. Ignore the "Unknown macro" 
> text, it keeps being added by the editor :(.
>  
> When TwelweMonkey's ImageIO is removed from the classpath, and 
> xmlgraphics-commons is used instead, it works _(PDF is generated)_.
>  
> However, I need ImageIO in my project for other tasks.
>  
> Any ideas?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to