[jira] [Commented] (FOP-2156) PNG and GIF image generation fails in RTF documents

2015-07-30 Thread Carsten Pfeiffer (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14647583#comment-14647583
 ] 

Carsten Pfeiffer commented on FOP-2156:
---

Two fixes are ncessary to make PNG work with RTF:
XGC-97 and XGC-99, meaning.

> PNG and GIF image generation fails in RTF documents
> ---
>
> Key: FOP-2156
> URL: https://issues.apache.org/jira/browse/FOP-2156
> Project: FOP
>  Issue Type: Bug
>  Components: renderer/rtf
>Affects Versions: 1.1
> Environment: Operating System: All
> Platform: PC
>Reporter: Carl Zetterberg
>
> Tomcat 6
> java 1.7
> Fop 1.1
> xmlgraphics-commons-1.5.jar
>  width="auto" 
> height="auto" content-width="80%" content-height="auto" />
> will produce:
> org.apache.fop.render.rtf.rtflib.rtfdoc.RtfExternalGraphic$ExternalGraphicException:
>  The tag  does not support gif - image type
> both for PNG and GIF files when producing RTF documents
> The same environment and XSL produce PDF that are ok.
> Switching back to fop 1.0 and xmlgraphics-commons-1.4.jar resolves the 
> problem.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FOP-2156) PNG and GIF image generation fails in RTF documents

2013-01-25 Thread Luis Bernardo (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13563191#comment-13563191
 ] 

Luis Bernardo commented on FOP-2156:


I am unable to reproduce the behavior with fop-1.0. Tried in Mac, Linux and 
Windows and always get a blank page (the image, which apparently was embedded, 
is not visible). Can you provide your output RTF produced with 1.0? Also, can 
you convert your PNG to JPEG and see if it works?

> PNG and GIF image generation fails in RTF documents
> ---
>
> Key: FOP-2156
> URL: https://issues.apache.org/jira/browse/FOP-2156
> Project: Fop
>  Issue Type: Bug
>  Components: rtf
>Affects Versions: 1.1
> Environment: Operating System: All
> Platform: PC
>Reporter: Carl Zetterberg
>
> Tomcat 6
> java 1.7
> Fop 1.1
> xmlgraphics-commons-1.5.jar
>  width="auto" 
> height="auto" content-width="80%" content-height="auto" />
> will produce:
> org.apache.fop.render.rtf.rtflib.rtfdoc.RtfExternalGraphic$ExternalGraphicException:
>  The tag  does not support gif - image type
> both for PNG and GIF files when producing RTF documents
> The same environment and XSL produce PDF that are ok.
> Switching back to fop 1.0 and xmlgraphics-commons-1.4.jar resolves the 
> problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (FOP-2156) PNG and GIF image generation fails in RTF documents

2013-01-25 Thread Jonas Sextl (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13562725#comment-13562725
 ] 

Jonas Sextl commented on FOP-2156:
--

Using the preference/penalty setting I get the following error:


exec "/usr/local/java/bin/java" -Djava.awt.headless=true -classpath 
"/usr/local/fop/lib/xmlgraphics-commons-1.5.jar:/usr/local/fop/lib/xml-apis-ext-1.3.04.jar:/usr/local/fop/lib/xml-apis-1.3.04.jar:/usr/local/fop/lib/xercesImpl-2.7.1.jar:/usr/local/fop/lib/xalan-2.7.0.jar:/usr/local/fop/lib/serializer-2.7.0.jar:/usr/local/fop/lib/mlibwrapper_jai.jar:/usr/local/fop/lib/jai_core.jar:/usr/local/fop/lib/jai_codec.jar:/usr/local/fop/lib/commons-logging-1.0.4.jar:/usr/local/fop/lib/commons-io-1.3.1.jar:/usr/local/fop/lib/clibwrapper_jiio.jar:/usr/local/fop/lib/batik-all-1.7.jar:/usr/local/fop/lib/avalon-framework-4.2.0.jar:/usr/local/fop/build/fop.jar:/usr/local/fop/build/fop-sandbox.jar:/usr/local/fop/build/fop-hyph.jar:"
 org.apache.fop.cli.Main "-c" "/usr/local/fop/conf/fop.xconf" 
"_template_word_de.xml" "-rtf" "test.rtf"
Jan 25, 2013 3:25:45 PM org.apache.fop.apps.FopFactoryConfigurator configure
INFO: Default page-height set to: 11in
Jan 25, 2013 3:25:45 PM org.apache.fop.apps.FopFactoryConfigurator configure
INFO: Default page-width set to: 8.26in
Jan 25, 2013 3:25:45 PM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Image not available. Reason: 
org.apache.xmlgraphics.image.loader.ImageException: Cannot load image (no 
suitable loader/converter combination available) for images/school-logo.png 
(image/png) (No context info available)
org.apache.xmlgraphics.image.loader.ImageException: Cannot load image (no 
suitable loader/converter combination available) for images/school-logo.png 
(image/png)
at 
org.apache.xmlgraphics.image.loader.ImageManager.getImage(ImageManager.java:271)
at org.apache.fop.render.rtf.RTFHandler.putGraphic(RTFHandler.java:1176)
at org.apache.fop.render.rtf.RTFHandler.image(RTFHandler.java:1092)
at 
org.apache.fop.render.rtf.RTFHandler.invokeDeferredEvent(RTFHandler.java:1543)
at 
org.apache.fop.render.rtf.RTFHandler.recurseFONode(RTFHandler.java:1697)
at 
org.apache.fop.render.rtf.RTFHandler.recurseFONode(RTFHandler.java:1772)
at 
org.apache.fop.render.rtf.RTFHandler.recurseFONode(RTFHandler.java:1772)
at 
org.apache.fop.render.rtf.RTFHandler.recurseFONode(RTFHandler.java:1707)
at 
org.apache.fop.render.rtf.RTFHandler.endPageSequence(RTFHandler.java:268)
at 
org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:128)
at 
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:347)
at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:181)
at 
org.apache.xalan.transformer.TransformerIdentityImpl.endElement(TransformerIdentityImpl.java:1101)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown 
Source)
at org.apache.xerces.xinclude.XIncludeHandler.endElement(Unknown Source)
at 
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(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:484)
at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:300)
at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:130)
at org.apache.fop.cli.Main.startFOP(Main.java:177)
at org.apache.fop.cli.Main.main(Main.java:208)

The image file itself is there:
ls -l images/school-logo.png
  -rw-rw-r-- 1   20499 Feb 11  2012 images/school-logo.png

file images/school-logo.png:
images/school-logo.png: PNG image data, 725 x 101, 8-bit/color RGBA, 
non-interlaced


> PNG and GIF image generation fails in RTF documents
> ---
>
> Key: FOP-2156
> URL: https://issues.apache.org/jira/browse/FOP-2156
> Project: Fop
>  Issue Type: Bug
>  Components: rtf
>Affects Versions: 1.1
> Environment: Operating System: All
> Platform: PC
>Reporter: Carl Zetterberg
>
> Tomcat 6
> java 1.7
> Fop 1.1
> xmlgraphics-commons-1.5.jar
>   

[jira] [Commented] (FOP-2156) PNG and GIF image generation fails in RTF documents

2013-01-25 Thread Jonas Sextl (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13562724#comment-13562724
 ] 

Jonas Sextl commented on FOP-2156:
--

The following code works with fop-1.0:



> PNG and GIF image generation fails in RTF documents
> ---
>
> Key: FOP-2156
> URL: https://issues.apache.org/jira/browse/FOP-2156
> Project: Fop
>  Issue Type: Bug
>  Components: rtf
>Affects Versions: 1.1
> Environment: Operating System: All
> Platform: PC
>Reporter: Carl Zetterberg
>
> Tomcat 6
> java 1.7
> Fop 1.1
> xmlgraphics-commons-1.5.jar
>  width="auto" 
> height="auto" content-width="80%" content-height="auto" />
> will produce:
> org.apache.fop.render.rtf.rtflib.rtfdoc.RtfExternalGraphic$ExternalGraphicException:
>  The tag  does not support gif - image type
> both for PNG and GIF files when producing RTF documents
> The same environment and XSL produce PDF that are ok.
> Switching back to fop 1.0 and xmlgraphics-commons-1.4.jar resolves the 
> problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (FOP-2156) PNG and GIF image generation fails in RTF documents

2013-01-24 Thread Luis Bernardo (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13562085#comment-13562085
 ] 

Luis Bernardo commented on FOP-2156:


can you please provide an example that works with fop-1.0?

> PNG and GIF image generation fails in RTF documents
> ---
>
> Key: FOP-2156
> URL: https://issues.apache.org/jira/browse/FOP-2156
> Project: Fop
>  Issue Type: Bug
>  Components: rtf
>Affects Versions: 1.1
> Environment: Operating System: All
> Platform: PC
>Reporter: Carl Zetterberg
>
> Tomcat 6
> java 1.7
> Fop 1.1
> xmlgraphics-commons-1.5.jar
>  width="auto" 
> height="auto" content-width="80%" content-height="auto" />
> will produce:
> org.apache.fop.render.rtf.rtflib.rtfdoc.RtfExternalGraphic$ExternalGraphicException:
>  The tag  does not support gif - image type
> both for PNG and GIF files when producing RTF documents
> The same environment and XSL produce PDF that are ok.
> Switching back to fop 1.0 and xmlgraphics-commons-1.4.jar resolves the 
> problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (FOP-2156) PNG and GIF image generation fails in RTF documents

2013-01-23 Thread Luis Bernardo (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13561292#comment-13561292
 ] 

Luis Bernardo commented on FOP-2156:


the issue is not understood at the moment. but add this to the fop.xconf, 
before the  element:





see if it makes a difference. apparently this image loader is taking precedence 
with RTF.

> PNG and GIF image generation fails in RTF documents
> ---
>
> Key: FOP-2156
> URL: https://issues.apache.org/jira/browse/FOP-2156
> Project: Fop
>  Issue Type: Bug
>  Components: rtf
>Affects Versions: 1.1
> Environment: Operating System: All
> Platform: PC
>Reporter: Carl Zetterberg
>
> Tomcat 6
> java 1.7
> Fop 1.1
> xmlgraphics-commons-1.5.jar
>  width="auto" 
> height="auto" content-width="80%" content-height="auto" />
> will produce:
> org.apache.fop.render.rtf.rtflib.rtfdoc.RtfExternalGraphic$ExternalGraphicException:
>  The tag  does not support gif - image type
> both for PNG and GIF files when producing RTF documents
> The same environment and XSL produce PDF that are ok.
> Switching back to fop 1.0 and xmlgraphics-commons-1.4.jar resolves the 
> problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (FOP-2156) PNG and GIF image generation fails in RTF documents

2013-01-22 Thread Jonas Sextl (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13559727#comment-13559727
 ] 

Jonas Sextl commented on FOP-2156:
--

Thank you very much for your quick feedback.

I did some tests with JRE 1.7.0.11 on Debian 6.0 - same error.

Here again the detailed call logged using "fop_exec_debug = true":

"-c" "/usr/local/fop/conf/fop.xconf" "_template_word_de.xml" "-rtf" "test.rtf"
exec "/usr/local/java//bin/java" -Djava.awt.headless=true -classpath 
"/usr/local/fop/lib/xmlgraphics-commons-1.5.jar:/usr/local/fop/lib/xml-apis-ext-1.3.04.jar:/usr/local/fop/lib/xml-apis-1.3.04.jar:/usr/local/fop/lib/xercesImpl-2.7.1.jar:/usr/local/fop/lib/xalan-2.7.0.jar:/usr/local/fop/lib/serializer-2.7.0.jar:/usr/local/fop/lib/mlibwrapper_jai.jar:/usr/local/fop/lib/jai_core.jar:/usr/local/fop/lib/jai_codec.jar:/usr/local/fop/lib/commons-logging-1.0.4.jar:/usr/local/fop/lib/commons-io-1.3.1.jar:/usr/local/fop/lib/clibwrapper_jiio.jar:/usr/local/fop/lib/batik-all-1.7.jar:/usr/local/fop/lib/avalon-framework-4.2.0.jar:/usr/local/fop/build/fop.jar:/usr/local/fop/build/fop-sandbox.jar:/usr/local/fop/build/fop-hyph.jar::/usr/local/java/lib/jai_imageio.jar:/usr/local/java/lib/clibwrapper_jiio.jar:/usr/local/java/lib/ext/jai_codec.jar:/usr/local/java/lib/ext/jai_core.jar:/usr/local/java/lib/mlibwrapper_jai.jar"
 org.apache.fop.cli.Main ""-c"" ""/usr/local/fop/conf/fop.xconf"" 
""_template_word_de.xml"" ""-rtf"" ""test.rtf""

> PNG and GIF image generation fails in RTF documents
> ---
>
> Key: FOP-2156
> URL: https://issues.apache.org/jira/browse/FOP-2156
> Project: Fop
>  Issue Type: Bug
>  Components: rtf
>Affects Versions: 1.1
> Environment: Operating System: All
> Platform: PC
>Reporter: Carl Zetterberg
>
> Tomcat 6
> java 1.7
> Fop 1.1
> xmlgraphics-commons-1.5.jar
>  width="auto" 
> height="auto" content-width="80%" content-height="auto" />
> will produce:
> org.apache.fop.render.rtf.rtflib.rtfdoc.RtfExternalGraphic$ExternalGraphicException:
>  The tag  does not support gif - image type
> both for PNG and GIF files when producing RTF documents
> The same environment and XSL produce PDF that are ok.
> Switching back to fop 1.0 and xmlgraphics-commons-1.4.jar resolves the 
> problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (FOP-2156) PNG and GIF image generation fails in RTF documents

2013-01-22 Thread Carl Zetterberg (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13559592#comment-13559592
 ] 

Carl Zetterberg commented on FOP-2156:
--

Adding jai-imageio.jar to classpath made things work in my dev environment on 
Eclipse and java 1.7

However, in my production environment, which is also Win 2008 Server, but where 
we run java 1.6, the problem remained.
So we had this switch back to fop 1.0

I haven't been able to pinpoint exactly where the problem is.
But for sure, there is something with fop 1.1 and image loading that is not 100%




> PNG and GIF image generation fails in RTF documents
> ---
>
> Key: FOP-2156
> URL: https://issues.apache.org/jira/browse/FOP-2156
> Project: Fop
>  Issue Type: Bug
>  Components: rtf
>Affects Versions: 1.1
> Environment: Operating System: All
> Platform: PC
>Reporter: Carl Zetterberg
>
> Tomcat 6
> java 1.7
> Fop 1.1
> xmlgraphics-commons-1.5.jar
>  width="auto" 
> height="auto" content-width="80%" content-height="auto" />
> will produce:
> org.apache.fop.render.rtf.rtflib.rtfdoc.RtfExternalGraphic$ExternalGraphicException:
>  The tag  does not support gif - image type
> both for PNG and GIF files when producing RTF documents
> The same environment and XSL produce PDF that are ok.
> Switching back to fop 1.0 and xmlgraphics-commons-1.4.jar resolves the 
> problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (FOP-2156) PNG and GIF image generation fails in RTF documents

2013-01-22 Thread Jonas Sextl (JIRA)

[ 
https://issues.apache.org/jira/browse/FOP-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13559552#comment-13559552
 ] 

Jonas Sextl commented on FOP-2156:
--

Sorry, but this solution does not seem to work for me.

I installed the JAI libraries (very old from 2006) and I am calling FOP with 
the following parameters:


"-c" "/usr/local/fop/conf/fop.xconf" "_template_word_de.xml" "-rtf" "test.rtf"
exec "/usr/local/java//bin/java" -Djava.awt.headless=true -classpath 
"/usr/local/fop/lib/xmlgraphics-commons-1.5.jar:/usr/local/fop/lib/xml-apis-ext-1.3.04.jar:/usr/local/fop/lib/xml-apis-1.3.04.jar:/usr/local/fop/lib/xercesImpl-2.7.1.jar:/usr/local/fop/lib/xalan-2.7.0.jar:/usr/local/fop/lib/serializer-2.7.0.jar:/usr/local/fop/lib/mlibwrapper_jai.jar:/usr/local/fop/lib/jai_core.jar:/usr/local/fop/lib/jai_codec.jar:/usr/local/fop/lib/commons-logging-1.0.4.jar:/usr/local/fop/lib/commons-io-1.3.1.jar:/usr/local/fop/lib/clibwrapper_jiio.jar:/usr/local/fop/lib/batik-all-1.7.jar:/usr/local/fop/lib/avalon-framework-4.2.0.jar:/usr/local/fop/build/fop.jar:/usr/local/fop/build/fop-sandbox.jar:/usr/local/fop/build/fop-hyph.jar::/usr/local/java/lib/jai_imageio.jar:/usr/local/java/lib/clibwrapper_jiio.jar:/usr/local/java/lib/ext/jai_codec.jar:/usr/local/java/lib/ext/jai_core.jar:/usr/local/java/lib/mlibwrapper_jai.jar"
 org.apache.fop.cli.Main ""-c"" ""/usr/local/fop/conf/fop.xconf"" 
""_template_word_de.xml"" ""-rtf"" ""test.rtf""

Java version is:
java version "1.6.0_32"
Java(TM) SE Runtime Environment (build 1.6.0_32-b05)
Java HotSpot(TM) 64-Bit Server VM (build 20.7-b02, mixed mode)

Operating system: Debian 6
Linux sas-web01 2.6.32-5-amd64 #1 SMP Mon Jan 16 16:22:28 UTC 2012 x86_64 
GNU/Linux

I am still getting the following error in the generated RTF file:
org.apache.fop.render.rtf.rtflib.rtfdoc.RtfExternalGraphic$ExternalGraphicException:
 The tag  does not support png - image type.

Did I miss something or is this still a bug in FOP?

> PNG and GIF image generation fails in RTF documents
> ---
>
> Key: FOP-2156
> URL: https://issues.apache.org/jira/browse/FOP-2156
> Project: Fop
>  Issue Type: Bug
>  Components: rtf
>Affects Versions: 1.1
> Environment: Operating System: All
> Platform: PC
>Reporter: Carl Zetterberg
>
> Tomcat 6
> java 1.7
> Fop 1.1
> xmlgraphics-commons-1.5.jar
>  width="auto" 
> height="auto" content-width="80%" content-height="auto" />
> will produce:
> org.apache.fop.render.rtf.rtflib.rtfdoc.RtfExternalGraphic$ExternalGraphicException:
>  The tag  does not support gif - image type
> both for PNG and GIF files when producing RTF documents
> The same environment and XSL produce PDF that are ok.
> Switching back to fop 1.0 and xmlgraphics-commons-1.4.jar resolves the 
> problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira