You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "gdilem@libero.it" <gd...@libero.it> on 2006/01/26 09:43:16 UTC
problem with external-graphics
Hi all
I'm creating RTF.But when I use fo:external-gtaphics in the header I cannot see the image.I got:
ERROR org.apache.fop.render.rtf.RTFHandler - image: null
the strange things is that when I create a pdf with the same fo file it works fine.
Possible bug?
that's a part of the fo file:
.....
<fo:layout-master-set>
<fo:simple-page-master margin-bottom="0pt" margin-left="56.7pt" margin-right="56.7pt" master-reference="pm0" margin-top="0pt" master-name="pm0" page-height="841.9pt" page-width="595.3pt">
<fo:region-body margin-bottom="40pt" margin-top="45pt" region-name="xsl-region-body"/>
<fo:region-before extent="45pt" overflow="visible" region-name="xsl-region-before"/>
<fo:region-after extent="30pt" overflow="visible" region-name="xsl-region-after"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="pm0" >
<fo:static-content flow-name="xsl-region-before" >
<fo:block end-indent="0pt" orphans="2" start-indent="0pt" text-indent="0pt" widows="2">
<fo:external-graphic src="C:/jakarta-tomcat-5.5.7/webapps/admin_console/images/printHeader.png" content-height="25pt" content-width="500pt" />
</fo:block>
<fo:block font-weight="bold" end-indent="0pt" line-height="3.7pt" orphans="2" space-after="20pt" space-before="20pt" start-indent="0pt" text-indent="0pt" widows="2">
<fo:inline color="black" font-size = "8pt" font-family = "sans-serif" >
DETTAGLIO PROCEDIMENTO
</fo:inline>
</fo:block>
<fo:block end-indent="0pt" line-height="5pt" orphans="2" start-indent="0pt" text-indent="0pt" widows="2">
<fo:inline color="black" font-size="8pt">__________________________________________________________________________________________________________</fo:inline>
</fo:block>
</fo:static-content>
<fo:static-content flow-name="xsl-region-after" font="sans-serif">
<fo:block text-align="center">
<fo:inline font-size="7pt">
<fo:page-number />
</fo:inline>
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
.....
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: problem with external-graphics
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
You need to install Subversion (or a Subversion client like
TortoiseSVN) and download the sources as described in [1] which is
linked to by the earlier URL.
[1] http://xmlgraphics.apache.org/fop/dev/tools.html#svn
On 26.01.2006 16:24:35 gdilem\@libero\.it wrote:
> I'm sorry bu i'm not so expert of truck release...
> what exactly I should download in
> http://xmlgraphics.apache.org/fop/download.html#source
>
> I beg your pardon.
>
>
>
>
>
>
>
>
>
> ---------- Initial Header -----------
>
> >From : "Jeremias Maerki" dev@jeremias-maerki.ch
> To : fop-users@xmlgraphics.apache.org
> Cc :
> Date : Thu, 26 Jan 2006 15:59:40 +0100
> Subject : Re: problem with external-graphics
>
>
>
>
>
>
>
> >
> > On 26.01.2006 15:52:44 gdilem\@libero\.it wrote:
> > > I wrote what I got:
> > > ERROR org.apache.fop.render.rtf.RTFHandler - image: null
> > > but I repeat with the same fo file i can create pdf and including the same image (png image).
> >
> > Weird. Then it must be something else. Let's talk again when you're
> > running the latest sources.
> >
> > > Where can i find the latest FOP Trunk?
> >
> > See here:
> > http://xmlgraphics.apache.org/fop/download.html#source
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: How to create a list in FO?
Posted by Andreas L Delmelle <a_...@pandora.be>.
On Jan 26, 2006, at 19:39, Fabrizio Caldas wrote:
Hi all,
As a very powerful alternative, you can also use xsl:number for this:
> <xsl:template match="recommendItems">
> <fo:list-block provisional-label-separation="0.5cm"
> provisional-distance-between-starts="1cm" space-after="12pt"
> start-indent="1cm">
> <xsl:for-each select="recommendItem">
> <fo:list-item>
> <fo:list-item-label end-indent="label-end()">
> <fo:block><xsl:number value="position()" format="1. "/></
> fo:block>
In this case perhaps not much of a difference, but it definitely has
very much more niceties to offer, like 'multiple' or 'any' level
numbering, different formats (01, A, a, i, I)...
Just a thought.
HTH!
Cheers,
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: How to create a list in FO?
Posted by Fabrizio Caldas <fa...@gmail.com>.
Hi Daniele,
Here's an example of what I do to render a list.
I took this right off the xsl-fo I'm currently using, so this is working.
The catch here is that I'm not sure how many items will be on the list.
So I coded accordingly.
<!-- =============================== -->
<!-- child element: recommendItems -->
<!-- =============================== -->
<xsl:template match="recommendItems">
<fo:list-block provisional-label-separation="0.5cm"
provisional-distance-between-starts="1cm" space-after="12pt"
start-indent="1cm">
<xsl:for-each select="recommendItem">
<xsl:variable name="itemPos" select="position()"/>
<fo:list-item>
<fo:list-item-label end-indent="label-end()">
<fo:block><xsl:value-of select="$itemPos"/></fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>
<xsl:apply-templates />
</fo:block>
</fo:list-item-body>
</fo:list-item>
</xsl:for-each>
</fo:list-block>
</xsl:template>
Hope this helps,
Regards,
Fabrizio.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: How to create a list in FO?
Posted by Jay Bryant <ja...@bryantcs.com>.
Hi, Daniele,
It's not that different in FO, except that FO is much more verbose.
Here's that list in FO:
<fo:list-block>
<fo:list-item>
<fo:list-item-label>1.</fo:list-item-label>
<fo:list-item-body>First element
<fo:list-block>
<fo:list-item>
<fo:list-item-label>1.</fo:list-item-label>
<fo:list-item-body>first deep element</fo:list-item-body>
</fo:list-item>
<fo:list-item>
<fo:list-item-label>2.</fo:list-item-label>
<fo:list-item-body>secondo deep element
<fo:list-block>
<fo:list-item>
<fo:list-item-label>1.</fo:list-item-label>
<fo:list-item-body>third deep elemente</fo:list-item-body>
</fo:list-item>
</fo:list-block>
</fo:list-item-body>
</fo:list-item>
<fo:list-block>
</fo:list-item-body>
</fo:list-item>
<fo:list-item>
<fo:list-item-label>2.</fo:list-item-label>
<fo:list-item-body>Second element</fo:list-item-body>
</fo:list-item>
</fo:list-block>
I prepared that by hand, so it may have a typo or two, but the concept is right. Just like in HTML, the inner list goes within a listitem element. In FO, that means the inner list goes within the list-item-body element.
Also, note that there are a bunch of attributes you can add to these elements, to control font size and family, line height, and so on. I whipped up a stripped down list for the sake of an example.
HTH
Jay Bryant
Bryant Communication Services
----- Original Message -----
From: Daniele
To: fop-users@xmlgraphics.apache.org
Sent: Thursday, January 26, 2006 9:29 AM
Subject: How to create a list in FO?
Hi to all,
How can I create this list in FO?
Start List
1.. First element
1.. first deep element
2.. secondo deep element
1.. third deep elemente
2.. Second element
End List
in html is simple to do it, I want to know how can I create this in fo.
thanks,
Daniele
How to create a list in FO?
Posted by Daniele <de...@gmail.com>.
Hi to all,
How can I create this list in FO?
Start List
1.. First element
1.. first deep element
2.. secondo deep element
1.. third deep elemente
2.. Second element
End List
in html is simple to do it, I want to know how can I create this in fo.
thanks,
Daniele
Re: problem with external-graphics
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 26.01.2006 15:52:44 gdilem\@libero\.it wrote:
> I wrote what I got:
> ERROR org.apache.fop.render.rtf.RTFHandler - image: null
> but I repeat with the same fo file i can create pdf and including the same image (png image).
Weird. Then it must be something else. Let's talk again when you're
running the latest sources.
> Where can i find the latest FOP Trunk?
See here:
http://xmlgraphics.apache.org/fop/download.html#source
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: problem with external-graphics
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
I've just fixed the exception handling a little for external-graphics. I
assume it was a NullPointerException which was caused because the
filename of your image was wrong. If you updated to the latest FOP Trunk
code, you should get a better message. On the other side, you should
already have seen an error message about the missing image earlier in
the log output!
On 26.01.2006 09:43:16 gdilem\@libero\.it wrote:
> Hi all
> I'm creating RTF.But when I use fo:external-gtaphics in the header I cannot see the image.I got:
> ERROR org.apache.fop.render.rtf.RTFHandler - image: null
>
> the strange things is that when I create a pdf with the same fo file it works fine.
> Possible bug?
> that's a part of the fo file:
<snip/>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: problem with external-graphics
Posted by je...@atol.si.
There was a note that said that GIF is not supported
quote: RTF output currently doesn't support GIF images. Please convert
them to
PNG.
This was a answer sent by Jeremias Maerki Subject: Re: problem with FOP
0.9 and fo:external-graphics yesterday
Maybe png does not work either ??
Jelka