background images in RTF - compilation failure

View: New views
2 Messages — Rating Filter:   Alert me  

background images in RTF - compilation failure

by nancy_b :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Folks,

I have a document (in A5 format) that can be flawlessly compiled in PDF format, but fails in RTF. It seems that FOP cannot handle background images in <fo:block> elements when creating an RTF file. The following API in my print.xsl has caused this problem:

<xsl:param name="chap.label.path"
  select="normalize-space(//bookinfo//imagedata[@role='chap_label']/@fileref)"/>

<xsl:attribute-set name="chap.label.properties">
  ...
  <xsl:attribute name="background-image">
    <xsl:call-template name="fo-external-image">
      <xsl:with-param name="filename" select="$chap.label.path"/>
    </xsl:call-template>
  </xsl:attribute>
  <xsl:attribute name="background-attachment">fixed</xsl:attribute>
  <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
</xsl:attribute-set>

FOP fails to place the chapter number on top of a background
icon. As I said, in PDF it works fine.

When compiling RTF, I get the following error message:

WARNING: Ignored deferred event for org.apache.fop.fo.flow.RetrieveMarker@be49e0[@id=null]
May 27, 2009 4:11:44 PM org.apache.fop.render.rtf.RTFHandler startBlock
SEVERE: startBlock: null
May 27, 2009 4:11:44 PM org.apache.fop.cli.Main startFOP
SEVERE: Exception
java.lang.RuntimeException: Exception: java.lang.NullPointerException
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:217)
        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125)
        at org.apache.fop.cli.Main.startFOP(Main.java:166)
        at org.apache.fop.cli.Main.main(Main.java:197)

...

Please advise!
After upgrading FOP to version 0.95 the issue described further remained unresolved. Any ideas, folks?

Thank you all in advance!
Nancy



Re: background images in RTF - compilation failure

by Andreas Delmelle-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 02 Jul 2009, at 16:40, nancy_b wrote:

Hi Nancy

> I have a document (in A5 format) that can be flawlessly compiled in  
> PDF
> format, but fails in RTF. It seems that FOP cannot handle background  
> images
> in <fo:block> elements when creating an RTF file. The following API  
> in my
> print.xsl has caused this problem:

This seems to point to a limitation in RTF output. I don't think there  
already exists a Bugzilla entry for this. Please log it in Bugzilla,  
so we don't lose track of it. I don't know the code by heart, so  
cannot immediately judge whether it will be tough one to fix...


Thanks

Andreas

Andreas Delmelle
mailto:andreas.delmelle.AT.telenet.be
jabber: mandreas@...
skype: adlm0608

---


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@...
For additional commands, e-mail: fop-users-help@...