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 Ju...@Piater.name on 2008/02/05 20:26:55 UTC
Font naming and fonts used in SVG external graphics
Hi,
I've run into the following issue; see
http://www.intelsig.be/~piater/nobackup/fop/svgfonts/ for the
accompanying files:
- I've created a simple file text.svg with Inkscape containing text in
different TrueType fonts and three Nimbus Type-1 fonts. It displays
OK in Firefox and Batik (squiggle).
- If I include this file in svgtext.fo and process it with fop
(trunk), the resulting svgtext.pdf appears to contain only fonts
without spaces in their (Inkscape-assigned) names, with the
exception of the Type-1 font Nimbus Sans L, which is included as
NimbusSanL-Regu.
Fonts whose names contain spaces appear to be typeset using the
correct metrics, but the fonts are not embedded in the PDF.
- I created a file texttext.fo with the same content as text.svg. The
resulting texttext.pdf is equivalent to svgtext.pdf.
- I then removed the spaces in the TTF font names and adapted the
Nimbus names in text.svg and texttext.fo, naming the resulting files
textfop.svg and texttextfop.fo. The resulting texttextfop.pdf is
perfect, but svgtextfop.pdf remains equivalent to svgtext.pdf; no
improvement.
textfop.svg is still displayed correctly by Inkscape, Firefox and
Batik, except for the three Nimbus fonts, and Inkscape's font dialog
no longer displays the correct font names for any of the hand-edited
font names.
So, there seem to be two issues that perhaps go back to the same root:
- Fop does not appear to recognize fonts under the same names as other
programs do (Inkscape, but also OpenOffice.org). This appears to be
linked to spaces in TTF filenames, but the Nimbus (Type 1) story is
slightly different.
- There seems to be an issue with Fop embedding fonts required by SVG:
Font names that both Batik and Fop process correctly are not
necessarily processed correctly by Fop if they occur in embedded
SVG. (If I add textfop.svg to texttextfop.fo, the resulting SVG text
is still broken, even though the fonts are embedded and correctly
used by the fo:block text; this is independent on the order of
inclusion.)
Justus
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Font naming and fonts used in SVG external graphics
Posted by Ju...@Piater.name.
Jeremias Maerki <de...@jeremias-maerki.ch> wrote on Tue, 05 Feb 2008
20:50:57 +0100:
> FOP Trunk?
Yes.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Font naming and fonts used in SVG external graphics
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
FOP Trunk?
On 05.02.2008 20:26:55 Justus-bulk wrote:
> Hi,
>
> I've run into the following issue; see
> http://www.intelsig.be/~piater/nobackup/fop/svgfonts/ for the
> accompanying files:
>
> - I've created a simple file text.svg with Inkscape containing text in
> different TrueType fonts and three Nimbus Type-1 fonts. It displays
> OK in Firefox and Batik (squiggle).
>
> - If I include this file in svgtext.fo and process it with fop
> (trunk), the resulting svgtext.pdf appears to contain only fonts
> without spaces in their (Inkscape-assigned) names, with the
> exception of the Type-1 font Nimbus Sans L, which is included as
> NimbusSanL-Regu.
>
> Fonts whose names contain spaces appear to be typeset using the
> correct metrics, but the fonts are not embedded in the PDF.
>
> - I created a file texttext.fo with the same content as text.svg. The
> resulting texttext.pdf is equivalent to svgtext.pdf.
>
> - I then removed the spaces in the TTF font names and adapted the
> Nimbus names in text.svg and texttext.fo, naming the resulting files
> textfop.svg and texttextfop.fo. The resulting texttextfop.pdf is
> perfect, but svgtextfop.pdf remains equivalent to svgtext.pdf; no
> improvement.
>
> textfop.svg is still displayed correctly by Inkscape, Firefox and
> Batik, except for the three Nimbus fonts, and Inkscape's font dialog
> no longer displays the correct font names for any of the hand-edited
> font names.
>
> So, there seem to be two issues that perhaps go back to the same root:
>
> - Fop does not appear to recognize fonts under the same names as other
> programs do (Inkscape, but also OpenOffice.org). This appears to be
> linked to spaces in TTF filenames, but the Nimbus (Type 1) story is
> slightly different.
>
> - There seems to be an issue with Fop embedding fonts required by SVG:
> Font names that both Batik and Fop process correctly are not
> necessarily processed correctly by Fop if they occur in embedded
> SVG. (If I add textfop.svg to texttextfop.fo, the resulting SVG text
> is still broken, even though the fonts are embedded and correctly
> used by the fo:block text; this is independent on the order of
> inclusion.)
>
> Justus
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Apache errors
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
FOP doesn't support breaking absolutely positioned block-containers over
different pages. Furthermore, span="all" doesn't have an effect if used
inside a block-container. That only works on block that are direct
children of fo:flow.
Well, the spec says for fo:block-container that it "generates one or
more viewport/reference pairs".
http://www.w3.org/TR/xsl11/#fo_block-container
But I don't know what that means exactly for absolutely positioned
block-containers because the spec doesn't say anything about it. Anyway,
you'll have to find a different way to place the table at the place
where you want it, i.e. using margins on the page master.
On 11.02.2008 12:44:00 Cristian Ferrero wrote:
> Jeremias i did what you wrote, also i tried inserting a block with
> span="all", but the problem is that the table don't show all the
> information, it doesn't continue in other page, if i dont write
> position="absolute" it works good (the table continues in another page), but
> the table appears in the left side of the page automatically, not in the
> possition i want...
>
> fo:block-container position="absolute" top="15cm" left="10cm" >
>
> <fo:block span="all" >
>
> <fo:table table-layout="fixed" width="100%">
>
> ................
>
>
> thank you very much
>
> ----- Original Message -----
> From: "Jeremias Maerki" <de...@jeremias-maerki.ch>
> To: <fo...@xmlgraphics.apache.org>
> Sent: Monday, February 11, 2008 5:11 AM
> Subject: Re: Apache errors
>
>
> height="100%" on a block-container may not work correctly (absolute
> values work fine, of course). I've noticed some strange behaviour there
> but have never investigated, yet. Furthermore, height="100%" sets:
> block-progression-dimension.minimum="100%"
> block-progression-dimension.optimum="100%"
> block-progression-dimension.maximum="100%"
>
> Setting block-progression-dimension.maximum="auto" afterwards may not
> have any affect at all. I'm not sure if the spec says anything what
> happens in such a case. And how FOP reacts is a different question.
>
> As if this isn't enough, there's still a restriction on block-container
> that it doesn't evaluate a min/opt/max value for
> block-progression-dimension. Only .optimum is used.
>
> But if you want the block-container to automatically grow based on the
> height of it's content, just leave height and
> block-progression-dimension away which leaves the default ("auto").
>
> HTH
>
> On 08.02.2008 20:49:00 Cristian Ferrero wrote:
> > Tks Jeremias....the last for today ... i fixed all my problems but the
> > only that couldn't is to positionate a table in a fixed place, i mean i
> > did,
> > but it didn't show all the rows, it doesn't expand... i did this (put the
> > table inside a block-containert)
> >
> > <fo:block-container position="absolute" top="15cm" left="10cm"
> > height="100%" width="100%" block-progression-dimension.maximum="auto">
> > <fo:table table-layout="fixed" width="100%">........
> >
> > is the last question for this week..is my promise !!!! (i couldn't pot the
> > question because the mail server is giving me an error)
> >
> > thanks !!!!!
> >
> <snip/>
>
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Apache errors
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
No, unfortunately not. I see it on the radar, yet.
On 21.04.2008 13:36:24 Cristian Ferrero wrote:
> Jeremias, does 0.95 version work with XSL 1.1 features like flow-map
> support and multiple fo:region-body elements.?
>
> tks
>
> ----- Original Message -----
> From: "Jeremias Maerki" <de...@jeremias-maerki.ch>
> To: <fo...@xmlgraphics.apache.org>
> Sent: Monday, February 11, 2008 10:20 AM
> Subject: Re: Apache errors
>
>
> What you want to do is currently not possible with FOP. FOP would need
> to implement XSL 1.1 features like flow-map support and multiple
> fo:region-body elements.
>
> On 11.02.2008 14:01:25 Cristian Ferrero wrote:
> > Chris, Jeremias thank you bouth...but the only way to positioning a table
> > that expands in several pages is whith this kind of tips ? i mean
> > inserting
> > a column after or adjusting page margins or something like that ? i
> > suppoused there was a qualifiers for tables that could position them
> > keeping
> > all the properties as if we don't specify the position...my problem is
> > that
> > bouth solutions could give me problems because i have to positionate two
> > tables (one beside another)...
> >
> > page 1 :
> >
> > table 1 table 2
> >
> > xxxxxxxxxxx xxxxxxxxxxxx
> > xxxxxxxxxxx xxxxxxxxxxxx
> > xxxxxxxxxxx xxxxxxxxxxxx
> > xxxxxxxxxxx xxxxxxxxxxxx
> >
> > page 2 :
> >
> >
> > table 1 table 2
> >
> > xxxxxxxxxxx xxxxxxxxxxxx
> > xxxxxxxxxxx xxxxxxxxxxxx
> > xxxxxxxxxxxx
> > xxxxxxxxxxxx
> > xxxxxxxxxxxx
> >
> >
> > thank you bouth i am very appreciatte of your help..sorry because my
> > poor
> > knowledge..im trying to learn....
> >
> >
> >
> > ----- Original Message -----
> > From: "Chris Bowditch" <bo...@hotmail.com>
> > To: <fo...@xmlgraphics.apache.org>
> > Sent: Monday, February 11, 2008 8:55 AM
> > Subject: Re: Apache errors
> >
> >
> > > Cristian Ferrero wrote:
> > >
> > >> Jeremias i did what you wrote, also i tried inserting a block with
> > >> span="all", but the problem is that the table don't show all the
> > >> information, it doesn't continue in other page, if i dont write
> > >> position="absolute" it works good (the table continues in another
> > >> page),
> > >> but the table appears in the left side of the page automatically, not
> > >> in
> > >> the possition i want...
> > >
> > > Absolutely positioned block containers are supposed to be limited to a
> > > single page. They do not flow like regular blocks. You could try using
> > > relative positioning. However, I think the block-container would start
> > > at
> > > the top left of the second page it flows onto.
> > >
> > > If you want a flowing table positioned at (x,y) on each page then you
> > > might need an alternative approach. Something like a fixed height header
> > > row (to achieve y) and an extra blank column at the left of the table.
> > >
> > >>
> > >> fo:block-container position="absolute" top="15cm" left="10cm" >
> > >>
> > >> <fo:block span="all" >
> > >
> > > This only has meaning for regions with a column-count > 1 and I don't
> > > believe it will help you here.
> > >
> > > <snip/>
> > >
> > > Chris
> > >
> > >
>
>
> Jeremias Maerki
>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Apache errors
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
http://xmlgraphics.apache.org/fop/faq.html#when
On 11.02.2008 14:33:18 Cristian Ferrero wrote:
> ught..you just killed me.......any idea when those features could it be
> implemented ?
>
> ----- Original Message -----
> From: "Jeremias Maerki" <de...@jeremias-maerki.ch>
> To: <fo...@xmlgraphics.apache.org>
> Sent: Monday, February 11, 2008 10:20 AM
> Subject: Re: Apache errors
>
>
> What you want to do is currently not possible with FOP. FOP would need
> to implement XSL 1.1 features like flow-map support and multiple
> fo:region-body elements.
>
> On 11.02.2008 14:01:25 Cristian Ferrero wrote:
> > Chris, Jeremias thank you bouth...but the only way to positioning a table
> > that expands in several pages is whith this kind of tips ? i mean
> > inserting
> > a column after or adjusting page margins or something like that ? i
> > suppoused there was a qualifiers for tables that could position them
> > keeping
> > all the properties as if we don't specify the position...my problem is
> > that
> > bouth solutions could give me problems because i have to positionate two
> > tables (one beside another)...
> >
> > page 1 :
> >
> > table 1 table 2
> >
> > xxxxxxxxxxx xxxxxxxxxxxx
> > xxxxxxxxxxx xxxxxxxxxxxx
> > xxxxxxxxxxx xxxxxxxxxxxx
> > xxxxxxxxxxx xxxxxxxxxxxx
> >
> > page 2 :
> >
> >
> > table 1 table 2
> >
> > xxxxxxxxxxx xxxxxxxxxxxx
> > xxxxxxxxxxx xxxxxxxxxxxx
> > xxxxxxxxxxxx
> > xxxxxxxxxxxx
> > xxxxxxxxxxxx
> >
> >
> > thank you bouth i am very appreciatte of your help..sorry because my
> > poor
> > knowledge..im trying to learn....
> >
> >
> >
> > ----- Original Message -----
> > From: "Chris Bowditch" <bo...@hotmail.com>
> > To: <fo...@xmlgraphics.apache.org>
> > Sent: Monday, February 11, 2008 8:55 AM
> > Subject: Re: Apache errors
> >
> >
> > > Cristian Ferrero wrote:
> > >
> > >> Jeremias i did what you wrote, also i tried inserting a block with
> > >> span="all", but the problem is that the table don't show all the
> > >> information, it doesn't continue in other page, if i dont write
> > >> position="absolute" it works good (the table continues in another
> > >> page),
> > >> but the table appears in the left side of the page automatically, not
> > >> in
> > >> the possition i want...
> > >
> > > Absolutely positioned block containers are supposed to be limited to a
> > > single page. They do not flow like regular blocks. You could try using
> > > relative positioning. However, I think the block-container would start
> > > at
> > > the top left of the second page it flows onto.
> > >
> > > If you want a flowing table positioned at (x,y) on each page then you
> > > might need an alternative approach. Something like a fixed height header
> > > row (to achieve y) and an extra blank column at the left of the table.
> > >
> > >>
> > >> fo:block-container position="absolute" top="15cm" left="10cm" >
> > >>
> > >> <fo:block span="all" >
> > >
> > > This only has meaning for regions with a column-count > 1 and I don't
> > > believe it will help you here.
> > >
> > > <snip/>
> > >
> > > Chris
> > >
> > >
>
>
> Jeremias Maerki
>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Apache errors
Posted by Cristian Ferrero <cr...@hotmail.com>.
Jeremias, does 0.95 version work with XSL 1.1 features like flow-map
support and multiple fo:region-body elements.?
tks
----- Original Message -----
From: "Jeremias Maerki" <de...@jeremias-maerki.ch>
To: <fo...@xmlgraphics.apache.org>
Sent: Monday, February 11, 2008 10:20 AM
Subject: Re: Apache errors
What you want to do is currently not possible with FOP. FOP would need
to implement XSL 1.1 features like flow-map support and multiple
fo:region-body elements.
On 11.02.2008 14:01:25 Cristian Ferrero wrote:
> Chris, Jeremias thank you bouth...but the only way to positioning a table
> that expands in several pages is whith this kind of tips ? i mean
> inserting
> a column after or adjusting page margins or something like that ? i
> suppoused there was a qualifiers for tables that could position them
> keeping
> all the properties as if we don't specify the position...my problem is
> that
> bouth solutions could give me problems because i have to positionate two
> tables (one beside another)...
>
> page 1 :
>
> table 1 table 2
>
> xxxxxxxxxxx xxxxxxxxxxxx
> xxxxxxxxxxx xxxxxxxxxxxx
> xxxxxxxxxxx xxxxxxxxxxxx
> xxxxxxxxxxx xxxxxxxxxxxx
>
> page 2 :
>
>
> table 1 table 2
>
> xxxxxxxxxxx xxxxxxxxxxxx
> xxxxxxxxxxx xxxxxxxxxxxx
> xxxxxxxxxxxx
> xxxxxxxxxxxx
> xxxxxxxxxxxx
>
>
> thank you bouth i am very appreciatte of your help..sorry because my
> poor
> knowledge..im trying to learn....
>
>
>
> ----- Original Message -----
> From: "Chris Bowditch" <bo...@hotmail.com>
> To: <fo...@xmlgraphics.apache.org>
> Sent: Monday, February 11, 2008 8:55 AM
> Subject: Re: Apache errors
>
>
> > Cristian Ferrero wrote:
> >
> >> Jeremias i did what you wrote, also i tried inserting a block with
> >> span="all", but the problem is that the table don't show all the
> >> information, it doesn't continue in other page, if i dont write
> >> position="absolute" it works good (the table continues in another
> >> page),
> >> but the table appears in the left side of the page automatically, not
> >> in
> >> the possition i want...
> >
> > Absolutely positioned block containers are supposed to be limited to a
> > single page. They do not flow like regular blocks. You could try using
> > relative positioning. However, I think the block-container would start
> > at
> > the top left of the second page it flows onto.
> >
> > If you want a flowing table positioned at (x,y) on each page then you
> > might need an alternative approach. Something like a fixed height header
> > row (to achieve y) and an extra blank column at the left of the table.
> >
> >>
> >> fo:block-container position="absolute" top="15cm" left="10cm" >
> >>
> >> <fo:block span="all" >
> >
> > This only has meaning for regions with a column-count > 1 and I don't
> > believe it will help you here.
> >
> > <snip/>
> >
> > Chris
> >
> >
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Apache errors
Posted by Cristian Ferrero <cr...@hotmail.com>.
ught..you just killed me.......any idea when those features could it be
implemented ?
----- Original Message -----
From: "Jeremias Maerki" <de...@jeremias-maerki.ch>
To: <fo...@xmlgraphics.apache.org>
Sent: Monday, February 11, 2008 10:20 AM
Subject: Re: Apache errors
What you want to do is currently not possible with FOP. FOP would need
to implement XSL 1.1 features like flow-map support and multiple
fo:region-body elements.
On 11.02.2008 14:01:25 Cristian Ferrero wrote:
> Chris, Jeremias thank you bouth...but the only way to positioning a table
> that expands in several pages is whith this kind of tips ? i mean
> inserting
> a column after or adjusting page margins or something like that ? i
> suppoused there was a qualifiers for tables that could position them
> keeping
> all the properties as if we don't specify the position...my problem is
> that
> bouth solutions could give me problems because i have to positionate two
> tables (one beside another)...
>
> page 1 :
>
> table 1 table 2
>
> xxxxxxxxxxx xxxxxxxxxxxx
> xxxxxxxxxxx xxxxxxxxxxxx
> xxxxxxxxxxx xxxxxxxxxxxx
> xxxxxxxxxxx xxxxxxxxxxxx
>
> page 2 :
>
>
> table 1 table 2
>
> xxxxxxxxxxx xxxxxxxxxxxx
> xxxxxxxxxxx xxxxxxxxxxxx
> xxxxxxxxxxxx
> xxxxxxxxxxxx
> xxxxxxxxxxxx
>
>
> thank you bouth i am very appreciatte of your help..sorry because my
> poor
> knowledge..im trying to learn....
>
>
>
> ----- Original Message -----
> From: "Chris Bowditch" <bo...@hotmail.com>
> To: <fo...@xmlgraphics.apache.org>
> Sent: Monday, February 11, 2008 8:55 AM
> Subject: Re: Apache errors
>
>
> > Cristian Ferrero wrote:
> >
> >> Jeremias i did what you wrote, also i tried inserting a block with
> >> span="all", but the problem is that the table don't show all the
> >> information, it doesn't continue in other page, if i dont write
> >> position="absolute" it works good (the table continues in another
> >> page),
> >> but the table appears in the left side of the page automatically, not
> >> in
> >> the possition i want...
> >
> > Absolutely positioned block containers are supposed to be limited to a
> > single page. They do not flow like regular blocks. You could try using
> > relative positioning. However, I think the block-container would start
> > at
> > the top left of the second page it flows onto.
> >
> > If you want a flowing table positioned at (x,y) on each page then you
> > might need an alternative approach. Something like a fixed height header
> > row (to achieve y) and an extra blank column at the left of the table.
> >
> >>
> >> fo:block-container position="absolute" top="15cm" left="10cm" >
> >>
> >> <fo:block span="all" >
> >
> > This only has meaning for regions with a column-count > 1 and I don't
> > believe it will help you here.
> >
> > <snip/>
> >
> > Chris
> >
> >
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Apache errors
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
What you want to do is currently not possible with FOP. FOP would need
to implement XSL 1.1 features like flow-map support and multiple
fo:region-body elements.
On 11.02.2008 14:01:25 Cristian Ferrero wrote:
> Chris, Jeremias thank you bouth...but the only way to positioning a table
> that expands in several pages is whith this kind of tips ? i mean inserting
> a column after or adjusting page margins or something like that ? i
> suppoused there was a qualifiers for tables that could position them keeping
> all the properties as if we don't specify the position...my problem is that
> bouth solutions could give me problems because i have to positionate two
> tables (one beside another)...
>
> page 1 :
>
> table 1 table 2
>
> xxxxxxxxxxx xxxxxxxxxxxx
> xxxxxxxxxxx xxxxxxxxxxxx
> xxxxxxxxxxx xxxxxxxxxxxx
> xxxxxxxxxxx xxxxxxxxxxxx
>
> page 2 :
>
>
> table 1 table 2
>
> xxxxxxxxxxx xxxxxxxxxxxx
> xxxxxxxxxxx xxxxxxxxxxxx
> xxxxxxxxxxxx
> xxxxxxxxxxxx
> xxxxxxxxxxxx
>
>
> thank you bouth i am very appreciatte of your help..sorry because my poor
> knowledge..im trying to learn....
>
>
>
> ----- Original Message -----
> From: "Chris Bowditch" <bo...@hotmail.com>
> To: <fo...@xmlgraphics.apache.org>
> Sent: Monday, February 11, 2008 8:55 AM
> Subject: Re: Apache errors
>
>
> > Cristian Ferrero wrote:
> >
> >> Jeremias i did what you wrote, also i tried inserting a block with
> >> span="all", but the problem is that the table don't show all the
> >> information, it doesn't continue in other page, if i dont write
> >> position="absolute" it works good (the table continues in another page),
> >> but the table appears in the left side of the page automatically, not in
> >> the possition i want...
> >
> > Absolutely positioned block containers are supposed to be limited to a
> > single page. They do not flow like regular blocks. You could try using
> > relative positioning. However, I think the block-container would start at
> > the top left of the second page it flows onto.
> >
> > If you want a flowing table positioned at (x,y) on each page then you
> > might need an alternative approach. Something like a fixed height header
> > row (to achieve y) and an extra blank column at the left of the table.
> >
> >>
> >> fo:block-container position="absolute" top="15cm" left="10cm" >
> >>
> >> <fo:block span="all" >
> >
> > This only has meaning for regions with a column-count > 1 and I don't
> > believe it will help you here.
> >
> > <snip/>
> >
> > Chris
> >
> >
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Apache errors
Posted by Cristian Ferrero <cr...@hotmail.com>.
Chris, Jeremias thank you bouth...but the only way to positioning a table
that expands in several pages is whith this kind of tips ? i mean inserting
a column after or adjusting page margins or something like that ? i
suppoused there was a qualifiers for tables that could position them keeping
all the properties as if we don't specify the position...my problem is that
bouth solutions could give me problems because i have to positionate two
tables (one beside another)...
page 1 :
table 1 table 2
xxxxxxxxxxx xxxxxxxxxxxx
xxxxxxxxxxx xxxxxxxxxxxx
xxxxxxxxxxx xxxxxxxxxxxx
xxxxxxxxxxx xxxxxxxxxxxx
page 2 :
table 1 table 2
xxxxxxxxxxx xxxxxxxxxxxx
xxxxxxxxxxx xxxxxxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxx
thank you bouth i am very appreciatte of your help..sorry because my poor
knowledge..im trying to learn....
----- Original Message -----
From: "Chris Bowditch" <bo...@hotmail.com>
To: <fo...@xmlgraphics.apache.org>
Sent: Monday, February 11, 2008 8:55 AM
Subject: Re: Apache errors
> Cristian Ferrero wrote:
>
>> Jeremias i did what you wrote, also i tried inserting a block with
>> span="all", but the problem is that the table don't show all the
>> information, it doesn't continue in other page, if i dont write
>> position="absolute" it works good (the table continues in another page),
>> but the table appears in the left side of the page automatically, not in
>> the possition i want...
>
> Absolutely positioned block containers are supposed to be limited to a
> single page. They do not flow like regular blocks. You could try using
> relative positioning. However, I think the block-container would start at
> the top left of the second page it flows onto.
>
> If you want a flowing table positioned at (x,y) on each page then you
> might need an alternative approach. Something like a fixed height header
> row (to achieve y) and an extra blank column at the left of the table.
>
>>
>> fo:block-container position="absolute" top="15cm" left="10cm" >
>>
>> <fo:block span="all" >
>
> This only has meaning for regions with a column-count > 1 and I don't
> believe it will help you here.
>
> <snip/>
>
> Chris
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Apache errors
Posted by Chris Bowditch <bo...@hotmail.com>.
Cristian Ferrero wrote:
> Jeremias i did what you wrote, also i tried inserting a block with
> span="all", but the problem is that the table don't show all the
> information, it doesn't continue in other page, if i dont write
> position="absolute" it works good (the table continues in another page),
> but the table appears in the left side of the page automatically, not in
> the possition i want...
Absolutely positioned block containers are supposed to be limited to a
single page. They do not flow like regular blocks. You could try using
relative positioning. However, I think the block-container would start
at the top left of the second page it flows onto.
If you want a flowing table positioned at (x,y) on each page then you
might need an alternative approach. Something like a fixed height header
row (to achieve y) and an extra blank column at the left of the table.
>
> fo:block-container position="absolute" top="15cm" left="10cm" >
>
> <fo:block span="all" >
This only has meaning for regions with a column-count > 1 and I don't
believe it will help you here.
<snip/>
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Apache errors
Posted by Cristian Ferrero <cr...@hotmail.com>.
Jeremias i did what you wrote, also i tried inserting a block with
span="all", but the problem is that the table don't show all the
information, it doesn't continue in other page, if i dont write
position="absolute" it works good (the table continues in another page), but
the table appears in the left side of the page automatically, not in the
possition i want...
fo:block-container position="absolute" top="15cm" left="10cm" >
<fo:block span="all" >
<fo:table table-layout="fixed" width="100%">
................
thank you very much
----- Original Message -----
From: "Jeremias Maerki" <de...@jeremias-maerki.ch>
To: <fo...@xmlgraphics.apache.org>
Sent: Monday, February 11, 2008 5:11 AM
Subject: Re: Apache errors
height="100%" on a block-container may not work correctly (absolute
values work fine, of course). I've noticed some strange behaviour there
but have never investigated, yet. Furthermore, height="100%" sets:
block-progression-dimension.minimum="100%"
block-progression-dimension.optimum="100%"
block-progression-dimension.maximum="100%"
Setting block-progression-dimension.maximum="auto" afterwards may not
have any affect at all. I'm not sure if the spec says anything what
happens in such a case. And how FOP reacts is a different question.
As if this isn't enough, there's still a restriction on block-container
that it doesn't evaluate a min/opt/max value for
block-progression-dimension. Only .optimum is used.
But if you want the block-container to automatically grow based on the
height of it's content, just leave height and
block-progression-dimension away which leaves the default ("auto").
HTH
On 08.02.2008 20:49:00 Cristian Ferrero wrote:
> Tks Jeremias....the last for today ... i fixed all my problems but the
> only that couldn't is to positionate a table in a fixed place, i mean i
> did,
> but it didn't show all the rows, it doesn't expand... i did this (put the
> table inside a block-containert)
>
> <fo:block-container position="absolute" top="15cm" left="10cm"
> height="100%" width="100%" block-progression-dimension.maximum="auto">
> <fo:table table-layout="fixed" width="100%">........
>
> is the last question for this week..is my promise !!!! (i couldn't pot the
> question because the mail server is giving me an error)
>
> thanks !!!!!
>
<snip/>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Apache errors
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
height="100%" on a block-container may not work correctly (absolute
values work fine, of course). I've noticed some strange behaviour there
but have never investigated, yet. Furthermore, height="100%" sets:
block-progression-dimension.minimum="100%"
block-progression-dimension.optimum="100%"
block-progression-dimension.maximum="100%"
Setting block-progression-dimension.maximum="auto" afterwards may not
have any affect at all. I'm not sure if the spec says anything what
happens in such a case. And how FOP reacts is a different question.
As if this isn't enough, there's still a restriction on block-container
that it doesn't evaluate a min/opt/max value for
block-progression-dimension. Only .optimum is used.
But if you want the block-container to automatically grow based on the
height of it's content, just leave height and
block-progression-dimension away which leaves the default ("auto").
HTH
On 08.02.2008 20:49:00 Cristian Ferrero wrote:
> Tks Jeremias....the last for today ... i fixed all my problems but the
> only that couldn't is to positionate a table in a fixed place, i mean i did,
> but it didn't show all the rows, it doesn't expand... i did this (put the
> table inside a block-containert)
>
> <fo:block-container position="absolute" top="15cm" left="10cm"
> height="100%" width="100%" block-progression-dimension.maximum="auto">
> <fo:table table-layout="fixed" width="100%">........
>
> is the last question for this week..is my promise !!!! (i couldn't pot the
> question because the mail server is giving me an error)
>
> thanks !!!!!
>
<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: Apache errors
Posted by Cristian Ferrero <cr...@hotmail.com>.
Tks Jeremias....the last for today ... i fixed all my problems but the
only that couldn't is to positionate a table in a fixed place, i mean i did,
but it didn't show all the rows, it doesn't expand... i did this (put the
table inside a block-containert)
<fo:block-container position="absolute" top="15cm" left="10cm"
height="100%" width="100%" block-progression-dimension.maximum="auto">
<fo:table table-layout="fixed" width="100%">........
is the last question for this week..is my promise !!!! (i couldn't pot the
question because the mail server is giving me an error)
thanks !!!!!
----- Original Message -----
From: "Jeremias Maerki" <de...@jeremias-maerki.ch>
To: <fo...@xmlgraphics.apache.org>
Sent: Friday, February 08, 2008 9:56 AM
Subject: Re: Apache errors
On 08.02.2008 13:23:18 Cristian Ferrero wrote:
> Really thanks Mathias...i will follow your advice..... another
> question...is
> there a way to configure another unit of measures for position (i mean
> centimetres for example) instead of 0pt..like this example...
> width="49.0pt"
Sure, see here: http://www.w3.org/TR/xsl11/#d0e5752
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Apache errors
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 08.02.2008 13:23:18 Cristian Ferrero wrote:
> Really thanks Mathias...i will follow your advice..... another question...is
> there a way to configure another unit of measures for position (i mean
> centimetres for example) instead of 0pt..like this example...
> width="49.0pt"
Sure, see here: http://www.w3.org/TR/xsl11/#d0e5752
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Apache errors
Posted by Cristian Ferrero <cr...@hotmail.com>.
Really thanks Mathias...i will follow your advice..... another question...is
there a way to configure another unit of measures for position (i mean
centimetres for example) instead of 0pt..like this example...
width="49.0pt"
----- Original Message -----
From: "Jeremias Maerki" <de...@jeremias-maerki.ch>
To: <fo...@xmlgraphics.apache.org>
Sent: Friday, February 08, 2008 4:41 AM
Subject: Re: Apache errors
Christian,
the problem, as far as I understand it, is that XSLFast still produces
XSL-FO optimized for FOP 0.20.5 (I think they still use that version
internally). And 0.20.5 was too lenient (i.e. contained bugs) in many
cases which hurts you now if you use a later version of FOP which is
more FO-compliant. The right way would be to talk to the XSLFast people
and get them to fix their stylesheet production. The alternative I gave
you earlier already is to enable relaxed validation which will let FOP
overlook the empty table elements. If that fixes all your problems, I
can't guarantee.
Just to be clear: We're not talking about writing "fop code", we're
talking about writing "correct XSL-FO". That's the duty of an XSL-FO
editor like XSLfast. If XSLfast doesn't do that, that's a bug in their
software because it doesn't respect the XSL-FO specification.
On 07.02.2007 20:26:59 Cristian Ferrero wrote:
> Thanks Jeremias....i fixed it but i still have FOP format problems like
> fo:table-body is missing child elements.....etc... the strange thing (is
> how
> i told you ) that this xsl XSLFAST transforms in xsl-fo and then in pdf
> with
> no problems...but that's not apache problem...in fact...where cab i have
> documentation of exactly code fop supported with apache..or better than
> that.,.,do you know something like XSLF that writes "real" apache - fop
> code
> ?
> Thanks, i apreciate your help
>
>
> ----- Original Message -----
> From: "Jeremias Maerki" <de...@jeremias-maerki.ch>
> To: <fo...@xmlgraphics.apache.org>
> Sent: Thursday, February 07, 2008 11:58 AM
> Subject: Re: Apache errors
>
>
> Your top-level template listens to "IMPFACT", but your XML contains
> "IMPFAC" as the top-level element. Because of that the template is never
> triggered and instead default templates provided by XSLT are being used
> and they just output the node content found. That's why the generated FO
> looks more like a text file than an XML file.
>
> On 07.02.2008 15:46:09 Cristian Ferrero wrote:
> > i follow your advice and transform my xsl in fop...it works but i don't
> > think that fo file appears to be a valid one, because it has no nodes,
> > when
> > i try to convert fo to pdf error says
> >
> > org.xml.sax.SAXParseException: Content is not allowed in prolog
> >
> > i post my 3 files
> <snip/>
>
> Jeremias Maerki
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Apache errors
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Christian,
the problem, as far as I understand it, is that XSLFast still produces
XSL-FO optimized for FOP 0.20.5 (I think they still use that version
internally). And 0.20.5 was too lenient (i.e. contained bugs) in many
cases which hurts you now if you use a later version of FOP which is
more FO-compliant. The right way would be to talk to the XSLFast people
and get them to fix their stylesheet production. The alternative I gave
you earlier already is to enable relaxed validation which will let FOP
overlook the empty table elements. If that fixes all your problems, I
can't guarantee.
Just to be clear: We're not talking about writing "fop code", we're
talking about writing "correct XSL-FO". That's the duty of an XSL-FO
editor like XSLfast. If XSLfast doesn't do that, that's a bug in their
software because it doesn't respect the XSL-FO specification.
On 07.02.2007 20:26:59 Cristian Ferrero wrote:
> Thanks Jeremias....i fixed it but i still have FOP format problems like
> fo:table-body is missing child elements.....etc... the strange thing (is how
> i told you ) that this xsl XSLFAST transforms in xsl-fo and then in pdf with
> no problems...but that's not apache problem...in fact...where cab i have
> documentation of exactly code fop supported with apache..or better than
> that.,.,do you know something like XSLF that writes "real" apache - fop code
> ?
> Thanks, i apreciate your help
>
>
> ----- Original Message -----
> From: "Jeremias Maerki" <de...@jeremias-maerki.ch>
> To: <fo...@xmlgraphics.apache.org>
> Sent: Thursday, February 07, 2008 11:58 AM
> Subject: Re: Apache errors
>
>
> Your top-level template listens to "IMPFACT", but your XML contains
> "IMPFAC" as the top-level element. Because of that the template is never
> triggered and instead default templates provided by XSLT are being used
> and they just output the node content found. That's why the generated FO
> looks more like a text file than an XML file.
>
> On 07.02.2008 15:46:09 Cristian Ferrero wrote:
> > i follow your advice and transform my xsl in fop...it works but i don't
> > think that fo file appears to be a valid one, because it has no nodes,
> > when
> > i try to convert fo to pdf error says
> >
> > org.xml.sax.SAXParseException: Content is not allowed in prolog
> >
> > i post my 3 files
> <snip/>
>
> Jeremias Maerki
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Apache errors
Posted by Cristian Ferrero <cr...@hotmail.com>.
Thanks Jeremias....i fixed it but i still have FOP format problems like
fo:table-body is missing child elements.....etc... the strange thing (is how
i told you ) that this xsl XSLFAST transforms in xsl-fo and then in pdf with
no problems...but that's not apache problem...in fact...where cab i have
documentation of exactly code fop supported with apache..or better than
that.,.,do you know something like XSLF that writes "real" apache - fop code
?
Thanks, i apreciate your help
----- Original Message -----
From: "Jeremias Maerki" <de...@jeremias-maerki.ch>
To: <fo...@xmlgraphics.apache.org>
Sent: Thursday, February 07, 2008 11:58 AM
Subject: Re: Apache errors
Your top-level template listens to "IMPFACT", but your XML contains
"IMPFAC" as the top-level element. Because of that the template is never
triggered and instead default templates provided by XSLT are being used
and they just output the node content found. That's why the generated FO
looks more like a text file than an XML file.
On 07.02.2008 15:46:09 Cristian Ferrero wrote:
> i follow your advice and transform my xsl in fop...it works but i don't
> think that fo file appears to be a valid one, because it has no nodes,
> when
> i try to convert fo to pdf error says
>
> org.xml.sax.SAXParseException: Content is not allowed in prolog
>
> i post my 3 files
<snip/>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Apache errors
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Your top-level template listens to "IMPFACT", but your XML contains
"IMPFAC" as the top-level element. Because of that the template is never
triggered and instead default templates provided by XSLT are being used
and they just output the node content found. That's why the generated FO
looks more like a text file than an XML file.
On 07.02.2008 15:46:09 Cristian Ferrero wrote:
> i follow your advice and transform my xsl in fop...it works but i don't
> think that fo file appears to be a valid one, because it has no nodes, when
> i try to convert fo to pdf error says
>
> org.xml.sax.SAXParseException: Content is not allowed in prolog
>
> i post my 3 files
<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: FOP 0.93 Euro symbol not displayed
Posted by "Bennen, Jan A." <ja...@seneca.nl>.
Ok, it worked. MS Sans Serif was also ok.
I am using Saxon to create the fo file and I replaced the euro symbol with fo:wrapper font-family="Symbol">€</fo:wrapper> via the xslt sheet.
That did the job.
Thanks!
Met vriendelijke groet,
Jan Bennen
Support Engineer
Seneca Helpdesk
Elektronicaweg 31
2628 XG Delft, Nederland
T +31 (0)15 - 251 37 77
F +31 (0)15 - 251 37 01
E support@seneca.nl
I www.seneca.nl
Op dit mailbericht is onze disclaimer van kracht.
-----Original Message-----
From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
Sent: vrijdag 8 februari 2008 15:24
To: fop-users@xmlgraphics.apache.org
Subject: Re: FOP 0.93 Euro symbol not displayed
Not "MS Sans Serif", "sans-serif" which maps to the built-in base 14
"Helvetica" font. You can also use "Helvetica", of course.
On 08.02.2008 15:14:08 Bennen, Jan A. wrote:
> Which font does have a Euro glyph? MS Sans Serif seems not to have it. Or should I use another code for the eurosign?
>
> Met vriendelijke groet,
> Jan Bennen
> Support Engineer
> Seneca Helpdesk
>
> Elektronicaweg 31
> 2628 XG Delft, Nederland
> T +31 (0)15 - 251 37 77
> F +31 (0)15 - 251 37 01
> E support@seneca.nl
> I www.seneca.nl
> Op dit mailbericht is onze disclaimer van kracht.
>
>
>
> -----Original Message-----
> From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
> Sent: vrijdag 8 februari 2008 14:12
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: FOP 0.93 Euro symbol not displayed
>
>
> On 08.02.2008 14:04:54 Bennen, Jan A. wrote:
> > Ok, this worked: the symbol appears, but across the 0 of the following syllable. Is there a way to add some space between them?
>
> That's weird. I went looking and found out that the Euro character is
> missing a character width. I'll have to fix that. In that case, just use
> sans-serif instead of Symbol.
>
> > And is there an easy way to add
> > <fo:wrapper font-family="Symbol">€</fo:wrapper>
> > to the fo file? My customer does not want to edit the fo file.
>
> Two possible solutions:
> - Use a font that has a Euro glyph.
> - Help us implement per-character font-selection which is still missing.
> When that's available you can simply do:
> font-family="MyFont, MyOtherFont, Symbol, ZapfDingbats"
>
> <snip/>
>
>
>
> Jeremias Maerki
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: FOP 0.93 Euro symbol not displayed
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Not "MS Sans Serif", "sans-serif" which maps to the built-in base 14
"Helvetica" font. You can also use "Helvetica", of course.
On 08.02.2008 15:14:08 Bennen, Jan A. wrote:
> Which font does have a Euro glyph? MS Sans Serif seems not to have it. Or should I use another code for the eurosign?
>
> Met vriendelijke groet,
> Jan Bennen
> Support Engineer
> Seneca Helpdesk
>
> Elektronicaweg 31
> 2628 XG Delft, Nederland
> T +31 (0)15 - 251 37 77
> F +31 (0)15 - 251 37 01
> E support@seneca.nl
> I www.seneca.nl
> Op dit mailbericht is onze disclaimer van kracht.
>
>
>
> -----Original Message-----
> From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
> Sent: vrijdag 8 februari 2008 14:12
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: FOP 0.93 Euro symbol not displayed
>
>
> On 08.02.2008 14:04:54 Bennen, Jan A. wrote:
> > Ok, this worked: the symbol appears, but across the 0 of the following syllable. Is there a way to add some space between them?
>
> That's weird. I went looking and found out that the Euro character is
> missing a character width. I'll have to fix that. In that case, just use
> sans-serif instead of Symbol.
>
> > And is there an easy way to add
> > <fo:wrapper font-family="Symbol">€</fo:wrapper>
> > to the fo file? My customer does not want to edit the fo file.
>
> Two possible solutions:
> - Use a font that has a Euro glyph.
> - Help us implement per-character font-selection which is still missing.
> When that's available you can simply do:
> font-family="MyFont, MyOtherFont, Symbol, ZapfDingbats"
>
> <snip/>
>
>
>
> Jeremias Maerki
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: FOP 0.93 Euro symbol not displayed
Posted by "Bennen, Jan A." <ja...@seneca.nl>.
Which font does have a Euro glyph? MS Sans Serif seems not to have it. Or should I use another code for the eurosign?
Met vriendelijke groet,
Jan Bennen
Support Engineer
Seneca Helpdesk
Elektronicaweg 31
2628 XG Delft, Nederland
T +31 (0)15 - 251 37 77
F +31 (0)15 - 251 37 01
E support@seneca.nl
I www.seneca.nl
Op dit mailbericht is onze disclaimer van kracht.
-----Original Message-----
From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
Sent: vrijdag 8 februari 2008 14:12
To: fop-users@xmlgraphics.apache.org
Subject: Re: FOP 0.93 Euro symbol not displayed
On 08.02.2008 14:04:54 Bennen, Jan A. wrote:
> Ok, this worked: the symbol appears, but across the 0 of the following syllable. Is there a way to add some space between them?
That's weird. I went looking and found out that the Euro character is
missing a character width. I'll have to fix that. In that case, just use
sans-serif instead of Symbol.
> And is there an easy way to add
> <fo:wrapper font-family="Symbol">€</fo:wrapper>
> to the fo file? My customer does not want to edit the fo file.
Two possible solutions:
- Use a font that has a Euro glyph.
- Help us implement per-character font-selection which is still missing.
When that's available you can simply do:
font-family="MyFont, MyOtherFont, Symbol, ZapfDingbats"
<snip/>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: FOP 0.93 Euro symbol not displayed
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 08.02.2008 14:04:54 Bennen, Jan A. wrote:
> Ok, this worked: the symbol appears, but across the 0 of the following syllable. Is there a way to add some space between them?
That's weird. I went looking and found out that the Euro character is
missing a character width. I'll have to fix that. In that case, just use
sans-serif instead of Symbol.
> And is there an easy way to add
> <fo:wrapper font-family="Symbol">€</fo:wrapper>
> to the fo file? My customer does not want to edit the fo file.
Two possible solutions:
- Use a font that has a Euro glyph.
- Help us implement per-character font-selection which is still missing.
When that's available you can simply do:
font-family="MyFont, MyOtherFont, Symbol, ZapfDingbats"
<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: FOP 0.93 Euro symbol not displayed
Posted by "Bennen, Jan A." <ja...@seneca.nl>.
Ok, this worked: the symbol appears, but across the 0 of the following syllable. Is there a way to add some space between them?
And is there an easy way to add
<fo:wrapper font-family="Symbol">€</fo:wrapper>
to the fo file? My customer does not want to edit the fo file.
Regards
Jan Bennen
Support Engineer
Seneca Helpdesk
Elektronicaweg 31
2628 XG Delft, Nederland
T +31 (0)15 - 251 37 77
F +31 (0)15 - 251 37 01
E support@seneca.nl
I www.seneca.nl
Op dit mailbericht is onze disclaimer van kracht.
-----Original Message-----
From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
Sent: vrijdag 8 februari 2008 12:10
To: fop-users@xmlgraphics.apache.org
Subject: Re: FOP 0.93 Euro symbol not displayed
Ok, Jan sent me the file off-list.
"(€ 0,50 per min.)" doesn't work if the font you're using doesn't
have the Euro character. That's why you have to explicitely switch to
the "Symbol" (or sans-serif) font (as I have shown in my earlier example):
( <fo:wrapper font-family="Symbol">€</fo:wrapper> 0,50 per min.)
On 08.02.2008 11:47:22 Jeremias Maerki wrote:
> You didn't answer some of my questions. You can send me your FO and the
> PDF you generated from it to my mail address and I'll try to find out
> what's wrong.
>
> On 08.02.2008 10:43:41 Bennen, Jan A. wrote:
> > I am using Adobe Reader 8 and I am using € as symbol.
> >
> > Met vriendelijke groet,
> > Jan Bennen
> > Support Engineer
> > Seneca Helpdesk
> >
> > Elektronicaweg 31
> > 2628 XG Delft, Nederland
> > T +31 (0)15 - 251 37 77
> > F +31 (0)15 - 251 37 01
> > E support@seneca.nl
> > I www.seneca.nl
> > Op dit mailbericht is onze disclaimer van kracht.
> >
> >
> >
> > -----Original Message-----
> > From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
> > Sent: vrijdag 8 februari 2008 10:39
> > To: fop-users@xmlgraphics.apache.org
> > Subject: Re: FOP 0.93 Euro symbol not displayed
> >
> > Hmm, <fo:wrapper font-family="Symbol">€</fo:wrapper> works fine
> > for me to get the Euro character.
> >
> > What PDF viewer are you using? I checked Acrobat and GhostView.
> >
> > On 08.02.2008 10:18:01 Bennen, Jan A. wrote:
> > > Thank you for your answer.
> > > I know that the Euro symbol is in the Symbol font. But where can I find this?
> >
> > http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/codegen/fonts/encodings.xml?view=markup
> >
> > generated into CodePointMapping.java in build/gensrc/.... by our build.
> >
> > > This font is one of the base14 fonts which are simply available in FOP.
> > > So why is the Euro symbol still not displayed correctly?
> >
> > Either you try to replace the default Symbol font (see below) or the PDF
> > viewer you use does not have a glyph for the Euro character in the
> > Symbol font it uses.
> >
> > > I read in the documentation that I have to manually change the XML font
> > > metrics file and specify "SymbolEncoding" encoding as the value for the
> > > "encoding" element. But where can I find this file?
> >
> > Are you trying to replace the base14 font in your font configuration
> > perhaps? It's currently still problematic to replace the base14 Symbol
> > font.
> >
> >
> > > Regards,
> > > Jan Bennen
> > > Support Engineer
> > > Seneca Helpdesk
> > >
> > > Elektronicaweg 31
> > > 2628 XG Delft, Nederland
> > > T +31 (0)15 - 251 37 77
> > > F +31 (0)15 - 251 37 01
> > > E support@seneca.nl
> > > I www.seneca.nl
> > > Op dit mailbericht is onze disclaimer van kracht.
> > >
> > >
> > > -----Original Message-----
> > > From: Tommy Nordgren [mailto:tommy.nordgren@comhem.se]
> > > Sent: donderdag 7 februari 2008 16:08
> > > To: fop-users@xmlgraphics.apache.org
> > > Subject: Re: FOP 0.93 Euro symbol not displayed
> > >
> > >
> > > On 7 feb 2008, at 16.00, Bennen, Jan A. wrote:
> > >
> > > > Hello,
> > > > I am new to Fop.
> > > >
> > > > For one of our customers we are using FOP 0.93 to create PDF files.
> > > >
> > > > The Euro symbol is not displayed correctly in the pdf file (a
> > > > rectangle is shown).
> > > >
> > > > I changed in the FO file the symbol to € as is suggested in
> > > > your basic help, but nothing changes.
> > > >
> > > > Is there a solution for this problem?
> > > >
> > > > Kind regards,
> > > >
> > > > Jan Bennen
> > > > Support Engineer
> > > > Seneca Helpdesk
> > > >
> > > > Elektronicaweg 31
> > > > 2628 XG Delft, Nederland
> > > > T +31 (0)15 - 251 37 77
> > > > F +31 (0)15 - 251 37 01
> > > > E support@seneca.nl
> > > > I www.seneca.nl
> > > > Op dit mailbericht is onze disclaimer van kracht.
> > > >
> > > >
> > > >
> > > You need to render the document with a font THAT ACTUALLY CONTAINS
> > > the euro symbol.
> > > The rectangles are used to display characters that are missing in the
> > > current font.
> > > -----------------------------------
> > > See the amazing new SF reel: Invasion of the man eating cucumbers from
> > > outer space.
> > > On congratulations for a fantastic parody, the producer replies :
> > > "What parody?"
> > >
> > > Tommy Nordgren
> > > tommy.nordgren@comhem.se
> > >
> > >
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: FOP 0.93 Euro symbol not displayed
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Ok, Jan sent me the file off-list.
"(€ 0,50 per min.)" doesn't work if the font you're using doesn't
have the Euro character. That's why you have to explicitely switch to
the "Symbol" (or sans-serif) font (as I have shown in my earlier example):
(<fo:wrapper font-family="Symbol">€</fo:wrapper> 0,50 per min.)
On 08.02.2008 11:47:22 Jeremias Maerki wrote:
> You didn't answer some of my questions. You can send me your FO and the
> PDF you generated from it to my mail address and I'll try to find out
> what's wrong.
>
> On 08.02.2008 10:43:41 Bennen, Jan A. wrote:
> > I am using Adobe Reader 8 and I am using € as symbol.
> >
> > Met vriendelijke groet,
> > Jan Bennen
> > Support Engineer
> > Seneca Helpdesk
> >
> > Elektronicaweg 31
> > 2628 XG Delft, Nederland
> > T +31 (0)15 - 251 37 77
> > F +31 (0)15 - 251 37 01
> > E support@seneca.nl
> > I www.seneca.nl
> > Op dit mailbericht is onze disclaimer van kracht.
> >
> >
> >
> > -----Original Message-----
> > From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
> > Sent: vrijdag 8 februari 2008 10:39
> > To: fop-users@xmlgraphics.apache.org
> > Subject: Re: FOP 0.93 Euro symbol not displayed
> >
> > Hmm, <fo:wrapper font-family="Symbol">€</fo:wrapper> works fine
> > for me to get the Euro character.
> >
> > What PDF viewer are you using? I checked Acrobat and GhostView.
> >
> > On 08.02.2008 10:18:01 Bennen, Jan A. wrote:
> > > Thank you for your answer.
> > > I know that the Euro symbol is in the Symbol font. But where can I find this?
> >
> > http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/codegen/fonts/encodings.xml?view=markup
> >
> > generated into CodePointMapping.java in build/gensrc/.... by our build.
> >
> > > This font is one of the base14 fonts which are simply available in FOP.
> > > So why is the Euro symbol still not displayed correctly?
> >
> > Either you try to replace the default Symbol font (see below) or the PDF
> > viewer you use does not have a glyph for the Euro character in the
> > Symbol font it uses.
> >
> > > I read in the documentation that I have to manually change the XML font
> > > metrics file and specify "SymbolEncoding" encoding as the value for the
> > > "encoding" element. But where can I find this file?
> >
> > Are you trying to replace the base14 font in your font configuration
> > perhaps? It's currently still problematic to replace the base14 Symbol
> > font.
> >
> >
> > > Regards,
> > > Jan Bennen
> > > Support Engineer
> > > Seneca Helpdesk
> > >
> > > Elektronicaweg 31
> > > 2628 XG Delft, Nederland
> > > T +31 (0)15 - 251 37 77
> > > F +31 (0)15 - 251 37 01
> > > E support@seneca.nl
> > > I www.seneca.nl
> > > Op dit mailbericht is onze disclaimer van kracht.
> > >
> > >
> > > -----Original Message-----
> > > From: Tommy Nordgren [mailto:tommy.nordgren@comhem.se]
> > > Sent: donderdag 7 februari 2008 16:08
> > > To: fop-users@xmlgraphics.apache.org
> > > Subject: Re: FOP 0.93 Euro symbol not displayed
> > >
> > >
> > > On 7 feb 2008, at 16.00, Bennen, Jan A. wrote:
> > >
> > > > Hello,
> > > > I am new to Fop.
> > > >
> > > > For one of our customers we are using FOP 0.93 to create PDF files.
> > > >
> > > > The Euro symbol is not displayed correctly in the pdf file (a
> > > > rectangle is shown).
> > > >
> > > > I changed in the FO file the symbol to € as is suggested in
> > > > your basic help, but nothing changes.
> > > >
> > > > Is there a solution for this problem?
> > > >
> > > > Kind regards,
> > > >
> > > > Jan Bennen
> > > > Support Engineer
> > > > Seneca Helpdesk
> > > >
> > > > Elektronicaweg 31
> > > > 2628 XG Delft, Nederland
> > > > T +31 (0)15 - 251 37 77
> > > > F +31 (0)15 - 251 37 01
> > > > E support@seneca.nl
> > > > I www.seneca.nl
> > > > Op dit mailbericht is onze disclaimer van kracht.
> > > >
> > > >
> > > >
> > > You need to render the document with a font THAT ACTUALLY CONTAINS
> > > the euro symbol.
> > > The rectangles are used to display characters that are missing in the
> > > current font.
> > > -----------------------------------
> > > See the amazing new SF reel: Invasion of the man eating cucumbers from
> > > outer space.
> > > On congratulations for a fantastic parody, the producer replies :
> > > "What parody?"
> > >
> > > Tommy Nordgren
> > > tommy.nordgren@comhem.se
> > >
> > >
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: FOP 0.93 Euro symbol not displayed
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
You didn't answer some of my questions. You can send me your FO and the
PDF you generated from it to my mail address and I'll try to find out
what's wrong.
On 08.02.2008 10:43:41 Bennen, Jan A. wrote:
> I am using Adobe Reader 8 and I am using € as symbol.
>
> Met vriendelijke groet,
> Jan Bennen
> Support Engineer
> Seneca Helpdesk
>
> Elektronicaweg 31
> 2628 XG Delft, Nederland
> T +31 (0)15 - 251 37 77
> F +31 (0)15 - 251 37 01
> E support@seneca.nl
> I www.seneca.nl
> Op dit mailbericht is onze disclaimer van kracht.
>
>
>
> -----Original Message-----
> From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
> Sent: vrijdag 8 februari 2008 10:39
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: FOP 0.93 Euro symbol not displayed
>
> Hmm, <fo:wrapper font-family="Symbol">€</fo:wrapper> works fine
> for me to get the Euro character.
>
> What PDF viewer are you using? I checked Acrobat and GhostView.
>
> On 08.02.2008 10:18:01 Bennen, Jan A. wrote:
> > Thank you for your answer.
> > I know that the Euro symbol is in the Symbol font. But where can I find this?
>
> http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/codegen/fonts/encodings.xml?view=markup
>
> generated into CodePointMapping.java in build/gensrc/.... by our build.
>
> > This font is one of the base14 fonts which are simply available in FOP.
> > So why is the Euro symbol still not displayed correctly?
>
> Either you try to replace the default Symbol font (see below) or the PDF
> viewer you use does not have a glyph for the Euro character in the
> Symbol font it uses.
>
> > I read in the documentation that I have to manually change the XML font
> > metrics file and specify "SymbolEncoding" encoding as the value for the
> > "encoding" element. But where can I find this file?
>
> Are you trying to replace the base14 font in your font configuration
> perhaps? It's currently still problematic to replace the base14 Symbol
> font.
>
>
> > Regards,
> > Jan Bennen
> > Support Engineer
> > Seneca Helpdesk
> >
> > Elektronicaweg 31
> > 2628 XG Delft, Nederland
> > T +31 (0)15 - 251 37 77
> > F +31 (0)15 - 251 37 01
> > E support@seneca.nl
> > I www.seneca.nl
> > Op dit mailbericht is onze disclaimer van kracht.
> >
> >
> > -----Original Message-----
> > From: Tommy Nordgren [mailto:tommy.nordgren@comhem.se]
> > Sent: donderdag 7 februari 2008 16:08
> > To: fop-users@xmlgraphics.apache.org
> > Subject: Re: FOP 0.93 Euro symbol not displayed
> >
> >
> > On 7 feb 2008, at 16.00, Bennen, Jan A. wrote:
> >
> > > Hello,
> > > I am new to Fop.
> > >
> > > For one of our customers we are using FOP 0.93 to create PDF files.
> > >
> > > The Euro symbol is not displayed correctly in the pdf file (a
> > > rectangle is shown).
> > >
> > > I changed in the FO file the symbol to € as is suggested in
> > > your basic help, but nothing changes.
> > >
> > > Is there a solution for this problem?
> > >
> > > Kind regards,
> > >
> > > Jan Bennen
> > > Support Engineer
> > > Seneca Helpdesk
> > >
> > > Elektronicaweg 31
> > > 2628 XG Delft, Nederland
> > > T +31 (0)15 - 251 37 77
> > > F +31 (0)15 - 251 37 01
> > > E support@seneca.nl
> > > I www.seneca.nl
> > > Op dit mailbericht is onze disclaimer van kracht.
> > >
> > >
> > >
> > You need to render the document with a font THAT ACTUALLY CONTAINS
> > the euro symbol.
> > The rectangles are used to display characters that are missing in the
> > current font.
> > -----------------------------------
> > See the amazing new SF reel: Invasion of the man eating cucumbers from
> > outer space.
> > On congratulations for a fantastic parody, the producer replies :
> > "What parody?"
> >
> > Tommy Nordgren
> > tommy.nordgren@comhem.se
> >
> >
>
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: FOP 0.93 Euro symbol not displayed
Posted by "Bennen, Jan A." <ja...@seneca.nl>.
I am using Adobe Reader 8 and I am using € as symbol.
Met vriendelijke groet,
Jan Bennen
Support Engineer
Seneca Helpdesk
Elektronicaweg 31
2628 XG Delft, Nederland
T +31 (0)15 - 251 37 77
F +31 (0)15 - 251 37 01
E support@seneca.nl
I www.seneca.nl
Op dit mailbericht is onze disclaimer van kracht.
-----Original Message-----
From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
Sent: vrijdag 8 februari 2008 10:39
To: fop-users@xmlgraphics.apache.org
Subject: Re: FOP 0.93 Euro symbol not displayed
Hmm, <fo:wrapper font-family="Symbol">€</fo:wrapper> works fine
for me to get the Euro character.
What PDF viewer are you using? I checked Acrobat and GhostView.
On 08.02.2008 10:18:01 Bennen, Jan A. wrote:
> Thank you for your answer.
> I know that the Euro symbol is in the Symbol font. But where can I find this?
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/codegen/fonts/encodings.xml?view=markup
generated into CodePointMapping.java in build/gensrc/.... by our build.
> This font is one of the base14 fonts which are simply available in FOP.
> So why is the Euro symbol still not displayed correctly?
Either you try to replace the default Symbol font (see below) or the PDF
viewer you use does not have a glyph for the Euro character in the
Symbol font it uses.
> I read in the documentation that I have to manually change the XML font
> metrics file and specify "SymbolEncoding" encoding as the value for the
> "encoding" element. But where can I find this file?
Are you trying to replace the base14 font in your font configuration
perhaps? It's currently still problematic to replace the base14 Symbol
font.
> Regards,
> Jan Bennen
> Support Engineer
> Seneca Helpdesk
>
> Elektronicaweg 31
> 2628 XG Delft, Nederland
> T +31 (0)15 - 251 37 77
> F +31 (0)15 - 251 37 01
> E support@seneca.nl
> I www.seneca.nl
> Op dit mailbericht is onze disclaimer van kracht.
>
>
> -----Original Message-----
> From: Tommy Nordgren [mailto:tommy.nordgren@comhem.se]
> Sent: donderdag 7 februari 2008 16:08
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: FOP 0.93 Euro symbol not displayed
>
>
> On 7 feb 2008, at 16.00, Bennen, Jan A. wrote:
>
> > Hello,
> > I am new to Fop.
> >
> > For one of our customers we are using FOP 0.93 to create PDF files.
> >
> > The Euro symbol is not displayed correctly in the pdf file (a
> > rectangle is shown).
> >
> > I changed in the FO file the symbol to € as is suggested in
> > your basic help, but nothing changes.
> >
> > Is there a solution for this problem?
> >
> > Kind regards,
> >
> > Jan Bennen
> > Support Engineer
> > Seneca Helpdesk
> >
> > Elektronicaweg 31
> > 2628 XG Delft, Nederland
> > T +31 (0)15 - 251 37 77
> > F +31 (0)15 - 251 37 01
> > E support@seneca.nl
> > I www.seneca.nl
> > Op dit mailbericht is onze disclaimer van kracht.
> >
> >
> >
> You need to render the document with a font THAT ACTUALLY CONTAINS
> the euro symbol.
> The rectangles are used to display characters that are missing in the
> current font.
> -----------------------------------
> See the amazing new SF reel: Invasion of the man eating cucumbers from
> outer space.
> On congratulations for a fantastic parody, the producer replies :
> "What parody?"
>
> Tommy Nordgren
> tommy.nordgren@comhem.se
>
>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: FOP 0.93 Euro symbol not displayed
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Hmm, <fo:wrapper font-family="Symbol">€</fo:wrapper> works fine
for me to get the Euro character.
What PDF viewer are you using? I checked Acrobat and GhostView.
On 08.02.2008 10:18:01 Bennen, Jan A. wrote:
> Thank you for your answer.
> I know that the Euro symbol is in the Symbol font. But where can I find this?
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/codegen/fonts/encodings.xml?view=markup
generated into CodePointMapping.java in build/gensrc/.... by our build.
> This font is one of the base14 fonts which are simply available in FOP.
> So why is the Euro symbol still not displayed correctly?
Either you try to replace the default Symbol font (see below) or the PDF
viewer you use does not have a glyph for the Euro character in the
Symbol font it uses.
> I read in the documentation that I have to manually change the XML font
> metrics file and specify "SymbolEncoding" encoding as the value for the
> "encoding" element. But where can I find this file?
Are you trying to replace the base14 font in your font configuration
perhaps? It's currently still problematic to replace the base14 Symbol
font.
> Regards,
> Jan Bennen
> Support Engineer
> Seneca Helpdesk
>
> Elektronicaweg 31
> 2628 XG Delft, Nederland
> T +31 (0)15 - 251 37 77
> F +31 (0)15 - 251 37 01
> E support@seneca.nl
> I www.seneca.nl
> Op dit mailbericht is onze disclaimer van kracht.
>
>
> -----Original Message-----
> From: Tommy Nordgren [mailto:tommy.nordgren@comhem.se]
> Sent: donderdag 7 februari 2008 16:08
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: FOP 0.93 Euro symbol not displayed
>
>
> On 7 feb 2008, at 16.00, Bennen, Jan A. wrote:
>
> > Hello,
> > I am new to Fop.
> >
> > For one of our customers we are using FOP 0.93 to create PDF files.
> >
> > The Euro symbol is not displayed correctly in the pdf file (a
> > rectangle is shown).
> >
> > I changed in the FO file the symbol to € as is suggested in
> > your basic help, but nothing changes.
> >
> > Is there a solution for this problem?
> >
> > Kind regards,
> >
> > Jan Bennen
> > Support Engineer
> > Seneca Helpdesk
> >
> > Elektronicaweg 31
> > 2628 XG Delft, Nederland
> > T +31 (0)15 - 251 37 77
> > F +31 (0)15 - 251 37 01
> > E support@seneca.nl
> > I www.seneca.nl
> > Op dit mailbericht is onze disclaimer van kracht.
> >
> >
> >
> You need to render the document with a font THAT ACTUALLY CONTAINS
> the euro symbol.
> The rectangles are used to display characters that are missing in the
> current font.
> -----------------------------------
> See the amazing new SF reel: Invasion of the man eating cucumbers from
> outer space.
> On congratulations for a fantastic parody, the producer replies :
> "What parody?"
>
> Tommy Nordgren
> tommy.nordgren@comhem.se
>
>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: FOP 0.93 Euro symbol not displayed
Posted by "Bennen, Jan A." <ja...@seneca.nl>.
Thank you for your answer.
I know that the Euro symbol is in the Symbol font. But where can I find this?
This font is one of the base14 fonts which are simply available in FOP. So why is the Euro symbol still not displayed correctly?
I read in the documentation that I have to manually change the XML font metrics file and specify "SymbolEncoding" encoding as the value for the "encoding" element. But where can I find this file?
Regards,
Jan Bennen
Support Engineer
Seneca Helpdesk
Elektronicaweg 31
2628 XG Delft, Nederland
T +31 (0)15 - 251 37 77
F +31 (0)15 - 251 37 01
E support@seneca.nl
I www.seneca.nl
Op dit mailbericht is onze disclaimer van kracht.
-----Original Message-----
From: Tommy Nordgren [mailto:tommy.nordgren@comhem.se]
Sent: donderdag 7 februari 2008 16:08
To: fop-users@xmlgraphics.apache.org
Subject: Re: FOP 0.93 Euro symbol not displayed
On 7 feb 2008, at 16.00, Bennen, Jan A. wrote:
> Hello,
> I am new to Fop.
>
> For one of our customers we are using FOP 0.93 to create PDF files.
>
> The Euro symbol is not displayed correctly in the pdf file (a
> rectangle is shown).
>
> I changed in the FO file the symbol to € as is suggested in
> your basic help, but nothing changes.
>
> Is there a solution for this problem?
>
> Kind regards,
>
> Jan Bennen
> Support Engineer
> Seneca Helpdesk
>
> Elektronicaweg 31
> 2628 XG Delft, Nederland
> T +31 (0)15 - 251 37 77
> F +31 (0)15 - 251 37 01
> E support@seneca.nl
> I www.seneca.nl
> Op dit mailbericht is onze disclaimer van kracht.
>
>
>
You need to render the document with a font THAT ACTUALLY CONTAINS
the euro symbol.
The rectangles are used to display characters that are missing in the
current font.
-----------------------------------
See the amazing new SF reel: Invasion of the man eating cucumbers from
outer space.
On congratulations for a fantastic parody, the producer replies :
"What parody?"
Tommy Nordgren
tommy.nordgren@comhem.se
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: FOP 0.93 Euro symbol not displayed
Posted by Tommy Nordgren <to...@comhem.se>.
On 7 feb 2008, at 16.00, Bennen, Jan A. wrote:
> Hello,
> I am new to Fop.
>
> For one of our customers we are using FOP 0.93 to create PDF files.
>
> The Euro symbol is not displayed correctly in the pdf file (a
> rectangle is shown).
>
> I changed in the FO file the symbol to € as is suggested in
> your basic help, but nothing changes.
>
> Is there a solution for this problem?
>
> Kind regards,
>
> Jan Bennen
> Support Engineer
> Seneca Helpdesk
>
> Elektronicaweg 31
> 2628 XG Delft, Nederland
> T +31 (0)15 - 251 37 77
> F +31 (0)15 - 251 37 01
> E support@seneca.nl
> I www.seneca.nl
> Op dit mailbericht is onze disclaimer van kracht.
>
>
>
You need to render the document with a font THAT ACTUALLY CONTAINS
the euro symbol.
The rectangles are used to display characters that are missing in the
current font.
-----------------------------------
See the amazing new SF reel: Invasion of the man eating cucumbers from
outer space.
On congratulations for a fantastic parody, the producer replies :
"What parody?"
Tommy Nordgren
tommy.nordgren@comhem.se
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
FOP 0.93 Euro symbol not displayed
Posted by "Bennen, Jan A." <ja...@seneca.nl>.
Hello,
I am new to Fop.
For one of our customers we are using FOP 0.93 to create PDF files.
The Euro symbol is not displayed correctly in the pdf file (a rectangle is shown).
I changed in the FO file the symbol to € as is suggested in your basic help, but nothing changes.
Is there a solution for this problem?
Kind regards,
Jan Bennen
Support Engineer
Seneca Helpdesk
Elektronicaweg 31
2628 XG Delft, Nederland
T +31 (0)15 - 251 37 77
F +31 (0)15 - 251 37 01
E support@seneca.nl
I www.seneca.nl
Op dit mailbericht is onze disclaimer van kracht.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Apache errors
Posted by Cristian Ferrero <cr...@hotmail.com>.
i follow your advice and transform my xsl in fop...it works but i don't
think that fo file appears to be a valid one, because it has no nodes, when
i try to convert fo to pdf error says
org.xml.sax.SAXParseException: Content is not allowed in prolog
i post my 3 files
tks
----- Original Message -----
From: "Jeremias Maerki" <de...@jeremias-maerki.ch>
To: <fo...@xmlgraphics.apache.org>
Sent: Thursday, February 07, 2008 9:51 AM
Subject: Re: Apache errors
You'll have a much easier time if you just run the XSLT transformation
without FOP. Then you can inspect the generated XSL-FO. That should help
you figure out the problem. On the command-line you can use the -foout
option instead of -pdf to just generated the XSL-FO file.
BTW, posting an XSLT alone usually doesn't help because without knowing
how the XML looks like, most people won't even look at it because they
can't run it.
Given the error message, you probably need to make sure in your XSLT
that you don't generate any table-cells if you don't have content for
them. As a dirty hack you can try to use the -r (relaxed validation)
option on the command-line. That will overlook empty table-cells. But
empty table-cells are illegal so you should avoid them using XSLT means.
That's why it's a dirty hack.
Good luck!
On 07.02.2008 12:57:50 Cristian Ferrero wrote:
> Hi again...i can' t complete my xsl - fo conversion because a couple of
> errors that i can't get wich is the reason, i made my xsl with XSL FAST,
> then i fix a few things that Apache fop needs , by still have a couple of
> errors and i can't get the reason...
> first is a warning :
>
> ADVERTENCIA: Mismatch: table-cell (http://www.w3.org/1999/XSL/Format) vs.
> root (
> http://www.w3.org/1999/XSL/Format)
>
>
> another is an error :
>
> GRAVE: Exception
> javax.xml.transform.TransformerException:
> org.apache.fop.fo.ValidationException:
> Error(Unknown location): fo:table-cell is missing child elements.
> Required Content Model: marker* (%block;)+
> at
> org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)
> at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
> at org.apache.fop.cli.Main.startFOP(Main.java:166)
> at org.apache.fop.cli.Main.main(Main.java:197)
>
> i attach my xsl...really thanks...
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Apache errors
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
If the XSLT terminates like that it means that your stylesheet isn't
well-formed XML. Your XML editor should help you identify the problem.
However, if I look at the XSLT, I can see that there is more than one
problem. For example, there is an fo:block as direct child of an
fo:table-header (right next to a xsl:if in line 297). That's illegal and
will result in another error in FOP once you've fixed the
well-formedness.
So:
- fix well-formedness in the XSLT
- then fix the FO errors reported by FOP. The -foout option will help
you quickly seeing the problems in the generated FO. From there go back
to the XSLT to fix the problems.
Good luck!
On 07.02.2008 14:40:50 Cristian Ferrero wrote:
> Thank you Jeremias i did what you advice to me and now appears the error :
>
> javax.xml.transform.TransformerConfigurationException:
> javax.xml.transform.Trans
> formerConfigurationException: javax.xml.transform.TransformerException:
> org.xml.
> sax.SAXParseException: The element type "fo:table-cell" must be terminated
> by th
> e matching end-tag "</fo:table-cell>".
>
>
> im new at this, my xsl is made under XSLFAST , where i can see the pdf
> results with xml ...but with apache appears errors like this for example...i
> need work with apache because i have to run xml to pdf conversion from java
> aplication..exists really any application 100% compatible with apache fop
> where i can design my template and just run it with apache or i have to
> desist and make my xsl "manually"..
>
> i attach my xsl and my xml too.....thanks and sorry if i make dummy
> questions---
>
>
>
> ----- Original Message -----
> From: "Jeremias Maerki" <de...@jeremias-maerki.ch>
> To: <fo...@xmlgraphics.apache.org>
> Sent: Thursday, February 07, 2008 9:51 AM
> Subject: Re: Apache errors
>
>
> You'll have a much easier time if you just run the XSLT transformation
> without FOP. Then you can inspect the generated XSL-FO. That should help
> you figure out the problem. On the command-line you can use the -foout
> option instead of -pdf to just generated the XSL-FO file.
>
> BTW, posting an XSLT alone usually doesn't help because without knowing
> how the XML looks like, most people won't even look at it because they
> can't run it.
>
> Given the error message, you probably need to make sure in your XSLT
> that you don't generate any table-cells if you don't have content for
> them. As a dirty hack you can try to use the -r (relaxed validation)
> option on the command-line. That will overlook empty table-cells. But
> empty table-cells are illegal so you should avoid them using XSLT means.
> That's why it's a dirty hack.
>
> Good luck!
>
> On 07.02.2008 12:57:50 Cristian Ferrero wrote:
> > Hi again...i can' t complete my xsl - fo conversion because a couple of
> > errors that i can't get wich is the reason, i made my xsl with XSL FAST,
> > then i fix a few things that Apache fop needs , by still have a couple of
> > errors and i can't get the reason...
> > first is a warning :
> >
> > ADVERTENCIA: Mismatch: table-cell (http://www.w3.org/1999/XSL/Format) vs.
> > root (
> > http://www.w3.org/1999/XSL/Format)
> >
> >
> > another is an error :
> >
> > GRAVE: Exception
> > javax.xml.transform.TransformerException:
> > org.apache.fop.fo.ValidationException:
> > Error(Unknown location): fo:table-cell is missing child elements.
> > Required Content Model: marker* (%block;)+
> > at
> > org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)
> > at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
> > at org.apache.fop.cli.Main.startFOP(Main.java:166)
> > at org.apache.fop.cli.Main.main(Main.java:197)
> >
> > i attach my xsl...really thanks...
>
>
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Apache errors
Posted by Cristian Ferrero <cr...@hotmail.com>.
Thank you Jeremias i did what you advice to me and now appears the error :
javax.xml.transform.TransformerConfigurationException:
javax.xml.transform.Trans
formerConfigurationException: javax.xml.transform.TransformerException:
org.xml.
sax.SAXParseException: The element type "fo:table-cell" must be terminated
by th
e matching end-tag "</fo:table-cell>".
im new at this, my xsl is made under XSLFAST , where i can see the pdf
results with xml ...but with apache appears errors like this for example...i
need work with apache because i have to run xml to pdf conversion from java
aplication..exists really any application 100% compatible with apache fop
where i can design my template and just run it with apache or i have to
desist and make my xsl "manually"..
i attach my xsl and my xml too.....thanks and sorry if i make dummy
questions---
----- Original Message -----
From: "Jeremias Maerki" <de...@jeremias-maerki.ch>
To: <fo...@xmlgraphics.apache.org>
Sent: Thursday, February 07, 2008 9:51 AM
Subject: Re: Apache errors
You'll have a much easier time if you just run the XSLT transformation
without FOP. Then you can inspect the generated XSL-FO. That should help
you figure out the problem. On the command-line you can use the -foout
option instead of -pdf to just generated the XSL-FO file.
BTW, posting an XSLT alone usually doesn't help because without knowing
how the XML looks like, most people won't even look at it because they
can't run it.
Given the error message, you probably need to make sure in your XSLT
that you don't generate any table-cells if you don't have content for
them. As a dirty hack you can try to use the -r (relaxed validation)
option on the command-line. That will overlook empty table-cells. But
empty table-cells are illegal so you should avoid them using XSLT means.
That's why it's a dirty hack.
Good luck!
On 07.02.2008 12:57:50 Cristian Ferrero wrote:
> Hi again...i can' t complete my xsl - fo conversion because a couple of
> errors that i can't get wich is the reason, i made my xsl with XSL FAST,
> then i fix a few things that Apache fop needs , by still have a couple of
> errors and i can't get the reason...
> first is a warning :
>
> ADVERTENCIA: Mismatch: table-cell (http://www.w3.org/1999/XSL/Format) vs.
> root (
> http://www.w3.org/1999/XSL/Format)
>
>
> another is an error :
>
> GRAVE: Exception
> javax.xml.transform.TransformerException:
> org.apache.fop.fo.ValidationException:
> Error(Unknown location): fo:table-cell is missing child elements.
> Required Content Model: marker* (%block;)+
> at
> org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)
> at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
> at org.apache.fop.cli.Main.startFOP(Main.java:166)
> at org.apache.fop.cli.Main.main(Main.java:197)
>
> i attach my xsl...really thanks...
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Apache errors
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
You'll have a much easier time if you just run the XSLT transformation
without FOP. Then you can inspect the generated XSL-FO. That should help
you figure out the problem. On the command-line you can use the -foout
option instead of -pdf to just generated the XSL-FO file.
BTW, posting an XSLT alone usually doesn't help because without knowing
how the XML looks like, most people won't even look at it because they
can't run it.
Given the error message, you probably need to make sure in your XSLT
that you don't generate any table-cells if you don't have content for
them. As a dirty hack you can try to use the -r (relaxed validation)
option on the command-line. That will overlook empty table-cells. But
empty table-cells are illegal so you should avoid them using XSLT means.
That's why it's a dirty hack.
Good luck!
On 07.02.2008 12:57:50 Cristian Ferrero wrote:
> Hi again...i can' t complete my xsl - fo conversion because a couple of
> errors that i can't get wich is the reason, i made my xsl with XSL FAST,
> then i fix a few things that Apache fop needs , by still have a couple of
> errors and i can't get the reason...
> first is a warning :
>
> ADVERTENCIA: Mismatch: table-cell (http://www.w3.org/1999/XSL/Format) vs.
> root (
> http://www.w3.org/1999/XSL/Format)
>
>
> another is an error :
>
> GRAVE: Exception
> javax.xml.transform.TransformerException:
> org.apache.fop.fo.ValidationException:
> Error(Unknown location): fo:table-cell is missing child elements.
> Required Content Model: marker* (%block;)+
> at
> org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)
> at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
> at org.apache.fop.cli.Main.startFOP(Main.java:166)
> at org.apache.fop.cli.Main.main(Main.java:197)
>
> i attach my xsl...really thanks...
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: Apache errors
Posted by "Amick, Eric" <Er...@mail.house.gov>.
>From my quick look, I suspect at least one problem may lie with this
test:
<xsl:if
test="SERVICIOS/DETCONSUMO/DETCONSUMO/CONSUMOLIST/CONSUMO/TCONSUM='TFGEN
20001'">
You have the test enclosing the contents of the table-cell, but I think
you should have the test around the table-header that holds the
table-cell instead. If the test fails, I believe you want to skip the
entire table-header at the very least; you might want to consider
whether you want to generate the table at all in that case.
Eric Amick
Legislative Computer Systems
Office of the Clerk
-----Original Message-----
From: Cristian Ferrero [mailto:cristian_ferrero@hotmail.com]
Sent: Thursday, February 7, 2008 6:58
To: fop-users@xmlgraphics.apache.org
Subject: Apache errors
Hi again...i can' t complete my xsl - fo conversion because a couple of
errors that i can't get wich is the reason, i made my xsl with XSL FAST,
then i fix a few things that Apache fop needs , by still have a couple
of errors and i can't get the reason...
first is a warning :
ADVERTENCIA: Mismatch: table-cell (http://www.w3.org/1999/XSL/Format)
vs.
root (
http://www.w3.org/1999/XSL/Format)
another is an error :
GRAVE: Exception
javax.xml.transform.TransformerException:
org.apache.fop.fo.ValidationException:
Error(Unknown location): fo:table-cell is missing child elements.
Required Content Model: marker* (%block;)+
at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)
at
org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
at org.apache.fop.cli.Main.startFOP(Main.java:166)
at org.apache.fop.cli.Main.main(Main.java:197)
i attach my xsl...really thanks...
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Apache errors
Posted by Cristian Ferrero <cr...@hotmail.com>.
Hi again...i can' t complete my xsl - fo conversion because a couple of
errors that i can't get wich is the reason, i made my xsl with XSL FAST,
then i fix a few things that Apache fop needs , by still have a couple of
errors and i can't get the reason...
first is a warning :
ADVERTENCIA: Mismatch: table-cell (http://www.w3.org/1999/XSL/Format) vs.
root (
http://www.w3.org/1999/XSL/Format)
another is an error :
GRAVE: Exception
javax.xml.transform.TransformerException:
org.apache.fop.fo.ValidationException:
Error(Unknown location): fo:table-cell is missing child elements.
Required Content Model: marker* (%block;)+
at
org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:168)
at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
at org.apache.fop.cli.Main.startFOP(Main.java:166)
at org.apache.fop.cli.Main.main(Main.java:197)
i attach my xsl...really thanks...
Re: Font naming and fonts used in SVG external graphics
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Since I don't have the right Nimbus fonts to test with, I'll leave it up
to you to dig into the remaining problems. I don't want to waste too
much time trying to reproduce these and possibly failing. I'm sure you
have enough information to find fixes now. Good patches against FOP
Trunk are always welcome.
On 07.02.2008 10:18:37 Justus-bulk wrote:
> Jeremias Maerki <de...@jeremias-maerki.ch> wrote on Wed, 06 Feb 2008
> 20:52:48 +0100:
>
> > Please delete the cache file and check if it gets any better. :-)
>
> Progress after deleting fop-fonts.cache! I've updated the files on my
> Web server.
>
> - For the "official" font names (as used by Inkscape et al.), the
> output for SVG text and fo text is identical except for the DejaVu
> fonts, see below. pdffonts produces the exact same output for both.
>
> Almost all fonts are correct now; there are only two problems that
> remain:
>
> - All Nimbus fonts are italic; in addition, Nimbus Roman is
> bold. This is consistent between SVG and fo text.
>
> - The two DejaVu fonts ("DejaVu Sans" and "DejaVu Serif") are
> condensed. Here, the characters in SVG text are slightly more
> widely spaced than those in fo text; I suspect that Batik used the
> (correct) non-condensed font metrics to place the characters,
> whereas fop used the condensed fonts (including their metrics for
> fo text).
>
> - There should be no reason anymore to look into the "wrong" font
> names, but I'll do it anyway because one of the inconsistencies I
> observe may shed light onto the preceding issue concerning DejaVu
> fonts (here called "DejaVuSans" and "DejaVuSerif" without spaces):
>
> - fo text uses the correct (non-condensed) fonts.
>
> - SVG text however produces the exact same result as above:
> condensed font, using (apparently) non-condensed metrics.
>
> Does this information already help you? If not, I'll try your
> debugging suggestions, but it may take a while until I get around to
> it.
>
> Thanks,
> Justus
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
16-bit Bitmap support in BmpImage.java class ?
Posted by Harshini Madurapperuma <ha...@ifs.lk>.
Hi
I have the fop version 0.20.5 and a bit difficult to go for higher version for the moment, and I have to work with bitmap images. BmpImage.java doesn't support for 16-bit images. It throws the exception
"[ERROR] Error in XObject : Image (file:./graphics/SESSION/logbw_16.bmp) has 16 which is not a supported BMP format..."
Will I be able to get the code for 16-bit support?
Many thanks in Advance
Harshini.
-----Original Message-----
From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
Sent: Thursday, April 03, 2008 12:55 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Bitmap support in BmpImage.java class ?
You obviously missed the announcement of 0.95beta. Please try it out.
On 03.04.2008 07:56:23 Harshini Madurapperuma wrote:
> Hi Jeremias,
>
> I was working with Bitmap processing and the FOP version 0.94 doesn't
> support 16 bit bitmaps. Then You said the newer version FOP Trunk (
> 0.95) will definetly work for 16 bits and it'll be available by the
> end of February/March this year.
>
> Is it available now? If so can I get code for 16 bit support?
>
> Thanx in advance
> Regard
> Harshini
>
>
>
> -----Original Message-----
> From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
> Sent: Wednesday, February 13, 2008 3:08 PM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: Bitmap support in BmpImage.java class ?
>
> I know 16 bit works with FOP Trunk (and 0.95 when it is available). I don't know about 32 bit because I don't have a bitmap editor that can save 32-bit BMP images. If you can send me such a 32bit BMP I'll gladly test it with FOP Trunk.
>
> 0.94 still has the old image loading package. However, it could be that it supports 16 bit images. I haven't checked but if it does you may be able to get an idea how to decode 16bit images directly. FOP Trunk contains a completely new image loading framework which mostly uses ImageIO to load images so I don't really care about the individual formats anymore but delegate that to the codecs. This is similar to using JAI. But trust me, you don't want to backport the new image loading framework back into 0.20.5. That's far more work than hacking JAI into 0.20.5 to load all sorts of BMP images.
>
> So why don't you go with the JAI suggestion? I have no easier solution for you.
>
> On 13.02.2008 10:04:57 Harshini Madurapperuma wrote:
> > Hi Jeremias,
> >
> > Thanks for your valid suggestions. Does 0.95 supports for 16 and 32
> > bit images? What about the previous versions before 0.95? If you
> > have a higher version can I get the algorithm or the code?
> >
> > Thanks
> > Harshini.
> >
> > -----Original Message-----
> > From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
> > Sent: Wednesday, February 13, 2008 12:36 PM
> > To: fop-users@xmlgraphics.apache.org
> > Subject: Re: Bitmap support in BmpImage.java class ?
> >
> > Sure, you can. Either you replace BmpImage with the JAI implementation as discussed earlier or you change BmpImage. In the latter case, you have to convert the 16 and 32 bit image data to 24 bit RGB. Otherwise, the renderers will not process the image data correctly (FOP Trunk is much more flexible here). For this you need to know a few things about the BMP format. Start here to get more information:
> > http://en.wikipedia.org/wiki/BMP_file_format
> >
> > I think it's probably easiest if you use ImageIO or JAI to load BMP
> > images and convert them to the required 24bit pixel stream using the
> > BufferedImage.getRGB() method as done in JAIImage. But if I were you I'd try to upgrade FOP at least as soon as 0.95 is available next month.
> >
> > On 13.02.2008 05:11:01 Harshini Madurapperuma wrote:
> > > Hi all;
> > >
> > > I have the fop version 0.20.5, and I have to work with bitmap images.
> > > In BmpImage.java class the code supports only for 1,4,8 and 24 bit
> > > sizes, otherwise it throws an exception. Can't I modify this to
> > > support for 16 and 32 bits also with out changing the fop version.
> > > Your suggestions would be greatly appreciated.
> > >
> > > if (this.m_bitsPerPixel == 1)
> > > bytes = (this.m_width + 7) / 8;
> > > else if (this.m_bitsPerPixel == 24)
> > > bytes = this.m_width * 3;
> > > else if (this.m_bitsPerPixel == 4 || this.m_bitsPerPixel == 8)
> > > bytes = this.m_width / (8 / this.m_bitsPerPixel);
> > > else
> > > throw new FopImageException("Image (" + this.m_href.toString()
> > > + ") has " + this.m_bitsPerPixel
> > > + " which is not a
> > > supported BMP format...");
> > >
> > > Regards,
> > > Harshini.
> >
> >
> >
> > Jeremias Maerki
> >
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail:
> > fop-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail:
> > fop-users-help@xmlgraphics.apache.org
> >
> > --------------------------------------------------------------------
> > --
> > --------
> >
> > CONFIDENTIALITY AND DISCLAIMER NOTICE
> >
> > This e-mail, including any attachments, is confidential and intended
> > only for the addressee. If you are not the intended recipient,
> > please notify us immediately and delete this e-mail from your
> > system. Any use or disclosure of the information contained herein is strictly prohibited.
> >
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail:
> > fop-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail:
> > fop-users-help@xmlgraphics.apache.org
> >
>
>
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
> ----------------------------------------------------------------------
> --------
>
> CONFIDENTIALITY AND DISCLAIMER NOTICE
>
> This e-mail, including any attachments, is confidential and intended
> only for the addressee. If you are not the intended recipient, please
> notify us immediately and delete this e-mail from your system. Any use
> or disclosure of the information contained herein is strictly prohibited.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
------------------------------------------------------------------------------
CONFIDENTIALITY AND DISCLAIMER NOTICE
This e-mail, including any attachments, is confidential and intended only for
the addressee. If you are not the intended recipient, please notify us
immediately and delete this e-mail from your system. Any use or disclosure of
the information contained herein is strictly prohibited.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Bitmap support in BmpImage.java class ?
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
You obviously missed the announcement of 0.95beta. Please try it out.
On 03.04.2008 07:56:23 Harshini Madurapperuma wrote:
> Hi Jeremias,
>
> I was working with Bitmap processing and the FOP version 0.94 doesn't
> support 16 bit bitmaps. Then You said the newer version FOP Trunk (
> 0.95) will definetly work for 16 bits and it'll be available by the end of
> February/March this year.
>
> Is it available now? If so can I get code for 16 bit support?
>
> Thanx in advance
> Regard
> Harshini
>
>
>
> -----Original Message-----
> From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
> Sent: Wednesday, February 13, 2008 3:08 PM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: Bitmap support in BmpImage.java class ?
>
> I know 16 bit works with FOP Trunk (and 0.95 when it is available). I don't know about 32 bit because I don't have a bitmap editor that can save 32-bit BMP images. If you can send me such a 32bit BMP I'll gladly test it with FOP Trunk.
>
> 0.94 still has the old image loading package. However, it could be that it supports 16 bit images. I haven't checked but if it does you may be able to get an idea how to decode 16bit images directly. FOP Trunk contains a completely new image loading framework which mostly uses ImageIO to load images so I don't really care about the individual formats anymore but delegate that to the codecs. This is similar to using JAI. But trust me, you don't want to backport the new image loading framework back into 0.20.5. That's far more work than hacking JAI into 0.20.5 to load all sorts of BMP images.
>
> So why don't you go with the JAI suggestion? I have no easier solution for you.
>
> On 13.02.2008 10:04:57 Harshini Madurapperuma wrote:
> > Hi Jeremias,
> >
> > Thanks for your valid suggestions. Does 0.95 supports for 16 and 32
> > bit images? What about the previous versions before 0.95? If you have
> > a higher version can I get the algorithm or the code?
> >
> > Thanks
> > Harshini.
> >
> > -----Original Message-----
> > From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
> > Sent: Wednesday, February 13, 2008 12:36 PM
> > To: fop-users@xmlgraphics.apache.org
> > Subject: Re: Bitmap support in BmpImage.java class ?
> >
> > Sure, you can. Either you replace BmpImage with the JAI implementation as discussed earlier or you change BmpImage. In the latter case, you have to convert the 16 and 32 bit image data to 24 bit RGB. Otherwise, the renderers will not process the image data correctly (FOP Trunk is much more flexible here). For this you need to know a few things about the BMP format. Start here to get more information:
> > http://en.wikipedia.org/wiki/BMP_file_format
> >
> > I think it's probably easiest if you use ImageIO or JAI to load BMP
> > images and convert them to the required 24bit pixel stream using the
> > BufferedImage.getRGB() method as done in JAIImage. But if I were you I'd try to upgrade FOP at least as soon as 0.95 is available next month.
> >
> > On 13.02.2008 05:11:01 Harshini Madurapperuma wrote:
> > > Hi all;
> > >
> > > I have the fop version 0.20.5, and I have to work with bitmap images.
> > > In BmpImage.java class the code supports only for 1,4,8 and 24 bit
> > > sizes, otherwise it throws an exception. Can't I modify this to
> > > support for 16 and 32 bits also with out changing the fop version.
> > > Your suggestions would be greatly appreciated.
> > >
> > > if (this.m_bitsPerPixel == 1)
> > > bytes = (this.m_width + 7) / 8;
> > > else if (this.m_bitsPerPixel == 24)
> > > bytes = this.m_width * 3;
> > > else if (this.m_bitsPerPixel == 4 || this.m_bitsPerPixel == 8)
> > > bytes = this.m_width / (8 / this.m_bitsPerPixel);
> > > else
> > > throw new FopImageException("Image (" + this.m_href.toString()
> > > + ") has " + this.m_bitsPerPixel
> > > + " which is not a supported
> > > BMP format...");
> > >
> > > Regards,
> > > Harshini.
> >
> >
> >
> > Jeremias Maerki
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> >
> > ----------------------------------------------------------------------
> > --------
> >
> > CONFIDENTIALITY AND DISCLAIMER NOTICE
> >
> > This e-mail, including any attachments, is confidential and intended
> > only for the addressee. If you are not the intended recipient, please
> > notify us immediately and delete this e-mail from your system. Any use
> > or disclosure of the information contained herein is strictly prohibited.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> >
>
>
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
> ------------------------------------------------------------------------------
>
> CONFIDENTIALITY AND DISCLAIMER NOTICE
>
> This e-mail, including any attachments, is confidential and intended only for
> the addressee. If you are not the intended recipient, please notify us
> immediately and delete this e-mail from your system. Any use or disclosure of
> the information contained herein is strictly prohibited.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: Bitmap support in BmpImage.java class ?
Posted by Harshini Madurapperuma <ha...@ifs.lk>.
Hi Jeremias,
I was working with Bitmap processing and the FOP version 0.94 doesn't support 16 bit bitmaps. Then You said the newer version FOP Trunk ( 0.95) will definetly work for 16 bits and it'll be available by the end of February/March this year.
Is it available now? If so can I get code for 16 bit support?
Thanx in advance
Regard
Harshini
-----Original Message-----
From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
Sent: Wednesday, February 13, 2008 3:08 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Bitmap support in BmpImage.java class ?
I know 16 bit works with FOP Trunk (and 0.95 when it is available). I don't know about 32 bit because I don't have a bitmap editor that can save 32-bit BMP images. If you can send me such a 32bit BMP I'll gladly test it with FOP Trunk.
0.94 still has the old image loading package. However, it could be that it supports 16 bit images. I haven't checked but if it does you may be able to get an idea how to decode 16bit images directly. FOP Trunk contains a completely new image loading framework which mostly uses ImageIO to load images so I don't really care about the individual formats anymore but delegate that to the codecs. This is similar to using JAI. But trust me, you don't want to backport the new image loading framework back into 0.20.5. That's far more work than hacking JAI into 0.20.5 to load all sorts of BMP images.
So why don't you go with the JAI suggestion? I have no easier solution for you.
On 13.02.2008 10:04:57 Harshini Madurapperuma wrote:
> Hi Jeremias,
>
> Thanks for your valid suggestions. Does 0.95 supports for 16 and 32
> bit images? What about the previous versions before 0.95? If you have
> a higher version can I get the algorithm or the code?
>
> Thanks
> Harshini.
>
> -----Original Message-----
> From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
> Sent: Wednesday, February 13, 2008 12:36 PM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: Bitmap support in BmpImage.java class ?
>
> Sure, you can. Either you replace BmpImage with the JAI implementation as discussed earlier or you change BmpImage. In the latter case, you have to convert the 16 and 32 bit image data to 24 bit RGB. Otherwise, the renderers will not process the image data correctly (FOP Trunk is much more flexible here). For this you need to know a few things about the BMP format. Start here to get more information:
> http://en.wikipedia.org/wiki/BMP_file_format
>
> I think it's probably easiest if you use ImageIO or JAI to load BMP
> images and convert them to the required 24bit pixel stream using the
> BufferedImage.getRGB() method as done in JAIImage. But if I were you I'd try to upgrade FOP at least as soon as 0.95 is available next month.
>
> On 13.02.2008 05:11:01 Harshini Madurapperuma wrote:
> > Hi all;
> >
> > I have the fop version 0.20.5, and I have to work with bitmap images.
> > In BmpImage.java class the code supports only for 1,4,8 and 24 bit
> > sizes, otherwise it throws an exception. Can't I modify this to
> > support for 16 and 32 bits also with out changing the fop version.
> > Your suggestions would be greatly appreciated.
> >
> > if (this.m_bitsPerPixel == 1)
> > bytes = (this.m_width + 7) / 8;
> > else if (this.m_bitsPerPixel == 24)
> > bytes = this.m_width * 3;
> > else if (this.m_bitsPerPixel == 4 || this.m_bitsPerPixel == 8)
> > bytes = this.m_width / (8 / this.m_bitsPerPixel);
> > else
> > throw new FopImageException("Image (" + this.m_href.toString()
> > + ") has " + this.m_bitsPerPixel
> > + " which is not a supported
> > BMP format...");
> >
> > Regards,
> > Harshini.
>
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
> ----------------------------------------------------------------------
> --------
>
> CONFIDENTIALITY AND DISCLAIMER NOTICE
>
> This e-mail, including any attachments, is confidential and intended
> only for the addressee. If you are not the intended recipient, please
> notify us immediately and delete this e-mail from your system. Any use
> or disclosure of the information contained herein is strictly prohibited.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
------------------------------------------------------------------------------
CONFIDENTIALITY AND DISCLAIMER NOTICE
This e-mail, including any attachments, is confidential and intended only for
the addressee. If you are not the intended recipient, please notify us
immediately and delete this e-mail from your system. Any use or disclosure of
the information contained herein is strictly prohibited.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Bitmap support in BmpImage.java class ?
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
I know 16 bit works with FOP Trunk (and 0.95 when it is available). I
don't know about 32 bit because I don't have a bitmap editor that can
save 32-bit BMP images. If you can send me such a 32bit BMP I'll gladly
test it with FOP Trunk.
0.94 still has the old image loading package. However, it could be that
it supports 16 bit images. I haven't checked but if it does you may be
able to get an idea how to decode 16bit images directly. FOP Trunk
contains a completely new image loading framework which mostly uses
ImageIO to load images so I don't really care about the individual
formats anymore but delegate that to the codecs. This is similar to
using JAI. But trust me, you don't want to backport the new image
loading framework back into 0.20.5. That's far more work than hacking
JAI into 0.20.5 to load all sorts of BMP images.
So why don't you go with the JAI suggestion? I have no easier solution
for you.
On 13.02.2008 10:04:57 Harshini Madurapperuma wrote:
> Hi Jeremias,
>
> Thanks for your valid suggestions. Does 0.95 supports for 16 and 32 bit
> images? What about the previous versions before 0.95? If you have a
> higher version can I get the algorithm or the code?
>
> Thanks
> Harshini.
>
> -----Original Message-----
> From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
> Sent: Wednesday, February 13, 2008 12:36 PM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: Bitmap support in BmpImage.java class ?
>
> Sure, you can. Either you replace BmpImage with the JAI implementation as discussed earlier or you change BmpImage. In the latter case, you have to convert the 16 and 32 bit image data to 24 bit RGB. Otherwise, the renderers will not process the image data correctly (FOP Trunk is much more flexible here). For this you need to know a few things about the BMP format. Start here to get more information:
> http://en.wikipedia.org/wiki/BMP_file_format
>
> I think it's probably easiest if you use ImageIO or JAI to load BMP images and convert them to the required 24bit pixel stream using the
> BufferedImage.getRGB() method as done in JAIImage. But if I were you I'd try to upgrade FOP at least as soon as 0.95 is available next month.
>
> On 13.02.2008 05:11:01 Harshini Madurapperuma wrote:
> > Hi all;
> >
> > I have the fop version 0.20.5, and I have to work with bitmap images.
> > In BmpImage.java class the code supports only for 1,4,8 and 24 bit
> > sizes, otherwise it throws an exception. Can't I modify this to
> > support for 16 and 32 bits also with out changing the fop version.
> > Your suggestions would be greatly appreciated.
> >
> > if (this.m_bitsPerPixel == 1)
> > bytes = (this.m_width + 7) / 8;
> > else if (this.m_bitsPerPixel == 24)
> > bytes = this.m_width * 3;
> > else if (this.m_bitsPerPixel == 4 || this.m_bitsPerPixel == 8)
> > bytes = this.m_width / (8 / this.m_bitsPerPixel);
> > else
> > throw new FopImageException("Image (" + this.m_href.toString()
> > + ") has " + this.m_bitsPerPixel
> > + " which is not a supported
> > BMP format...");
> >
> > Regards,
> > Harshini.
>
>
>
> Jeremias Maerki
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
> ------------------------------------------------------------------------------
>
> CONFIDENTIALITY AND DISCLAIMER NOTICE
>
> This e-mail, including any attachments, is confidential and intended only for
> the addressee. If you are not the intended recipient, please notify us
> immediately and delete this e-mail from your system. Any use or disclosure of
> the information contained herein is strictly prohibited.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Question on FOP extension automatic detection
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 13.02.2008 18:25:29 Andrejus Chaliapinas wrote:
> Jeremias,
>
> > The example may indeed be a little restricted for your case. But still,
> > you can provide your own URIResolver and do whatever you want inside it.
> > The clue here is that you get a central place for the whole FOP that lets
> > you convert URIs to InputStreams. And how you set up these InputStreams
> > is entirely up to you. FOP doesn't care. At any rate, you don't pass any
> > objects to the FOUserAgent but to your own, custom-built URIResolver
> > which is set on the FopFactory.
> >
>
> Could I add then custom URIResolver(s) to be activated/used only for
> particular prefixes?
You can only set one URIResolver. However, if you have multiple you can
write a URIResolver that uses the Composite pattern.
> Or should I implement resolve() method for each such
> different prefix and call some default URIResolver class in case of not
> special one is specified.
If you don't use the Composite pattern and only implement one
URIResolver you can listen to any number of prefixes you want.
> Is there any other dev doc on that? I've checked
> your recent SVG TestCase, but not sure if resolve() code should return null
> in default case.
No, URIResolver is an interface from JAXP. We just reuse the concept for
FOP. I'm sure you'll find examples on the net but it's really not that
difficult. Returning null shouldn't be a problem.
Just to give you the pattern:
public class MyURIResolver implements URIResolver {
public Source resolve(String href, String base) throws TransformerException {
if (href.startsWith("mystuff:")) {
InputStream in = <whatever>
return new StreamSource(in, href);
} else {
return null;
}
}
}
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: Question on FOP extension automatic detection
Posted by Andrejus Chaliapinas <a....@infosana.com>.
Jeremias,
> The example may indeed be a little restricted for your case. But still,
> you can provide your own URIResolver and do whatever you want inside it.
> The clue here is that you get a central place for the whole FOP that lets
> you convert URIs to InputStreams. And how you set up these InputStreams
> is entirely up to you. FOP doesn't care. At any rate, you don't pass any
> objects to the FOUserAgent but to your own, custom-built URIResolver
> which is set on the FopFactory.
>
Could I add then custom URIResolver(s) to be activated/used only for
particular prefixes? Or should I implement resolve() method for each such
different prefix and call some default URIResolver class in case of not
special one is specified. Is there any other dev doc on that? I've checked
your recent SVG TestCase, but not sure if resolve() code should return null
in default case.
Thank you,
Andrejus
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Question on FOP extension automatic detection
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 13.02.2008 17:11:44 Andrejus Chaliapinas wrote:
> Hi Jeremias,
>
> Thanks a lot for your prompt response. Let me clarify some issues.
>
> > Have you seen this page?
> > http://xmlgraphics.apache.org/fop/dev/extensions.html
> >
> > It contains the missing piece to auto-register your extension
> > (/META-INF/services/org.apache.fop.fo.ElementMapping).
> >
>
> Yes, that was exactly that missing piece of information!
>
> > You should go through the FOUserAgent (getUserAgent().resolveURI() on
> > your extension element) to resolve a URI and obtain an InputStream. If
> > you do that you can use the following information on the Wiki to
> > use authentication when opening network streams:
> > http://wiki.apache.org/xmlgraphics-fop/HowTo/BasicHttpAuthentication
> >
>
> Well, I'm looking at general authentication procedure, not just basic http
> authentication. That means that in some cases Java program, which starts
> whole transformation process, resides on client machine and have opened let
> say database connection and thus keeps that connection related session
> information in some object. But I don't see that I could pass an arbitrary
> object/parameter to FOUserAgent and then reuse that when I need from inside
> extension.
The example may indeed be a little restricted for your case. But still,
you can provide your own URIResolver and do whatever you want inside it.
The clue here is that you get a central place for the whole FOP that lets
you convert URIs to InputStreams. And how you set up these InputStreams
is entirely up to you. FOP doesn't care. At any rate, you don't pass any
objects to the FOUserAgent but to your own, custom-built URIResolver
which is set on the FopFactory.
> > May I ask what kind of extension you are developing? Just curious.
> >
>
> It's PDF file embedding feature I was looking into last year (you may remind
> my several question on where to start), but had no time to do. Though
> currently it's very close to initial completion after various experiments
> with other tools, which already do that.
Ah, I forgot.
> Andrejus
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: Question on FOP extension automatic detection
Posted by Andrejus Chaliapinas <a....@infosana.com>.
Hi Jeremias,
Thanks a lot for your prompt response. Let me clarify some issues.
> Have you seen this page?
> http://xmlgraphics.apache.org/fop/dev/extensions.html
>
> It contains the missing piece to auto-register your extension
> (/META-INF/services/org.apache.fop.fo.ElementMapping).
>
Yes, that was exactly that missing piece of information!
> You should go through the FOUserAgent (getUserAgent().resolveURI() on
> your extension element) to resolve a URI and obtain an InputStream. If
> you do that you can use the following information on the Wiki to
> use authentication when opening network streams:
> http://wiki.apache.org/xmlgraphics-fop/HowTo/BasicHttpAuthentication
>
Well, I'm looking at general authentication procedure, not just basic http
authentication. That means that in some cases Java program, which starts
whole transformation process, resides on client machine and have opened let
say database connection and thus keeps that connection related session
information in some object. But I don't see that I could pass an arbitrary
object/parameter to FOUserAgent and then reuse that when I need from inside
extension.
> May I ask what kind of extension you are developing? Just curious.
>
It's PDF file embedding feature I was looking into last year (you may remind
my several question on where to start), but had no time to do. Though
currently it's very close to initial completion after various experiments
with other tools, which already do that.
Andrejus
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Question on FOP extension automatic detection
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 13.02.2008 14:18:25 Andrejus Chaliapinas wrote:
> Hi All,
>
> I'm trying to develop my own FOP extension, but while running my
> transformation I always get that "Unknown formatting object" warning from
> ElementMappingRegistry class.
>
> When I do manual mapping registration via fopFactory.addElementMapping(new
> MyElementMapping()) before transformation start - everything works correctly
> later.
>
> Should I stay with such fopFactory manual registration or did I miss
> anything in those my custom files to implement/extend?
Have you seen this page? http://xmlgraphics.apache.org/fop/dev/extensions.html
It contains the missing piece to auto-register your extension
(/META-INF/services/org.apache.fop.fo.ElementMapping).
> And another question related to FOP extensions - suppose from inside my
> extension I'd like to open an InputStream. But that stream opening procedure
> requires me some additional information to pass (let say name, password,
> etc.). Is it possible somehow to pass from my Java program some sort of
> external Session/Context object to my extension by some mean? Or the only
> way is to extend some default Renderer with additional member variable and
> then analyze that variable inside extension logic?
You should go through the FOUserAgent (getUserAgent().resolveURI() on
your extension element) to resolve a URI and obtain an InputStream. If
you do that you can use the following information on the Wiki to
use authentication when opening network streams:
http://wiki.apache.org/xmlgraphics-fop/HowTo/BasicHttpAuthentication
> Questions here are related to FOP Trunk version.
>
> Thank you,
> Andrejus
May I ask what kind of extension you are developing? Just curious.
HTH
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Question on FOP extension automatic detection
Posted by Andrejus Chaliapinas <a....@infosana.com>.
Hi All,
I'm trying to develop my own FOP extension, but while running my
transformation I always get that "Unknown formatting object" warning from
ElementMappingRegistry class.
When I do manual mapping registration via fopFactory.addElementMapping(new
MyElementMapping()) before transformation start - everything works correctly
later.
Should I stay with such fopFactory manual registration or did I miss
anything in those my custom files to implement/extend?
And another question related to FOP extensions - suppose from inside my
extension I'd like to open an InputStream. But that stream opening procedure
requires me some additional information to pass (let say name, password,
etc.). Is it possible somehow to pass from my Java program some sort of
external Session/Context object to my extension by some mean? Or the only
way is to extend some default Renderer with additional member variable and
then analyze that variable inside extension logic?
Questions here are related to FOP Trunk version.
Thank you,
Andrejus
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: Bitmap support in BmpImage.java class ?
Posted by Harshini Madurapperuma <ha...@ifs.lk>.
Hi Jeremias,
Thanks for your valid suggestions. Does 0.95 supports for 16 and 32 bit images? What about the previous versions before 0.95? If you have a higher version can I get the algorithm or the code?
Thanks
Harshini.
-----Original Message-----
From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
Sent: Wednesday, February 13, 2008 12:36 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Bitmap support in BmpImage.java class ?
Sure, you can. Either you replace BmpImage with the JAI implementation as discussed earlier or you change BmpImage. In the latter case, you have to convert the 16 and 32 bit image data to 24 bit RGB. Otherwise, the renderers will not process the image data correctly (FOP Trunk is much more flexible here). For this you need to know a few things about the BMP format. Start here to get more information:
http://en.wikipedia.org/wiki/BMP_file_format
I think it's probably easiest if you use ImageIO or JAI to load BMP images and convert them to the required 24bit pixel stream using the
BufferedImage.getRGB() method as done in JAIImage. But if I were you I'd try to upgrade FOP at least as soon as 0.95 is available next month.
On 13.02.2008 05:11:01 Harshini Madurapperuma wrote:
> Hi all;
>
> I have the fop version 0.20.5, and I have to work with bitmap images.
> In BmpImage.java class the code supports only for 1,4,8 and 24 bit
> sizes, otherwise it throws an exception. Can't I modify this to
> support for 16 and 32 bits also with out changing the fop version.
> Your suggestions would be greatly appreciated.
>
> if (this.m_bitsPerPixel == 1)
> bytes = (this.m_width + 7) / 8;
> else if (this.m_bitsPerPixel == 24)
> bytes = this.m_width * 3;
> else if (this.m_bitsPerPixel == 4 || this.m_bitsPerPixel == 8)
> bytes = this.m_width / (8 / this.m_bitsPerPixel);
> else
> throw new FopImageException("Image (" + this.m_href.toString()
> + ") has " + this.m_bitsPerPixel
> + " which is not a supported
> BMP format...");
>
> Regards,
> Harshini.
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
------------------------------------------------------------------------------
CONFIDENTIALITY AND DISCLAIMER NOTICE
This e-mail, including any attachments, is confidential and intended only for
the addressee. If you are not the intended recipient, please notify us
immediately and delete this e-mail from your system. Any use or disclosure of
the information contained herein is strictly prohibited.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Bitmap support in BmpImage.java class ?
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Sure, you can. Either you replace BmpImage with the JAI implementation
as discussed earlier or you change BmpImage. In the latter case, you
have to convert the 16 and 32 bit image data to 24 bit RGB. Otherwise,
the renderers will not process the image data correctly (FOP Trunk is
much more flexible here). For this you need to know a few things about
the BMP format. Start here to get more information:
http://en.wikipedia.org/wiki/BMP_file_format
I think it's probably easiest if you use ImageIO or JAI to load BMP
images and convert them to the required 24bit pixel stream using the
BufferedImage.getRGB() method as done in JAIImage. But if I were you I'd
try to upgrade FOP at least as soon as 0.95 is available next month.
On 13.02.2008 05:11:01 Harshini Madurapperuma wrote:
> Hi all;
>
> I have the fop version 0.20.5, and I have to work with bitmap images.
> In BmpImage.java class the code supports only for 1,4,8 and 24 bit sizes,
> otherwise it throws an exception. Can't I modify this to support for 16
> and 32 bits also with out changing the fop version. Your suggestions
> would be greatly appreciated.
>
> if (this.m_bitsPerPixel == 1)
> bytes = (this.m_width + 7) / 8;
> else if (this.m_bitsPerPixel == 24)
> bytes = this.m_width * 3;
> else if (this.m_bitsPerPixel == 4 || this.m_bitsPerPixel == 8)
> bytes = this.m_width / (8 / this.m_bitsPerPixel);
> else
> throw new FopImageException("Image (" + this.m_href.toString()
> + ") has " + this.m_bitsPerPixel
> + " which is not a supported BMP format...");
>
> Regards,
> Harshini.
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Bitmap support in BmpImage.java class ?
Posted by Harshini Madurapperuma <ha...@ifs.lk>.
Hi all;
I have the fop version 0.20.5, and I have to work with bitmap images. In BmpImage.java class the code supports only for 1,4,8 and 24 bit sizes, otherwise it throws an exception. Can't I modify this to support for 16 and 32 bits also with out changing the fop version. Your suggestions would be greatly appreciated.
if (this.m_bitsPerPixel == 1)
bytes = (this.m_width + 7) / 8;
else if (this.m_bitsPerPixel == 24)
bytes = this.m_width * 3;
else if (this.m_bitsPerPixel == 4 || this.m_bitsPerPixel == 8)
bytes = this.m_width / (8 / this.m_bitsPerPixel);
else
throw new FopImageException("Image (" + this.m_href.toString()
+ ") has " + this.m_bitsPerPixel
+ " which is not a supported BMP format...");
Regards,
Harshini.
------------------------------------------------------------------------------
CONFIDENTIALITY AND DISCLAIMER NOTICE
This e-mail, including any attachments, is confidential and intended only for
the addressee. If you are not the intended recipient, please notify us
immediately and delete this e-mail from your system. Any use or disclosure of
the information contained herein is strictly prohibited.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: Converting BufferredImage into FopImage?
Posted by Harshini Madurapperuma <ha...@ifs.lk>.
HI
Yes I'm talking about bitmap images.
BTW FOP doesn't support 16 and 32 bit depth :(( I'm getting this error
:Image (file:./report_designer_graphics/FNDBAS/FND_SESSION_REP/IFSlogbw_16.bmp) has 16 which is not a supported BMP format.
/Harshini
-----Original Message-----
From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
Sent: Monday, February 11, 2008 5:10 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Converting BufferredImage into FopImage?
I don't understand why you want to do that. There's already a JAIImage.java which uses JAI to read bitmap images and converts a BufferedImage into the format needed by FOP (JAIImage is a subclass of FopImage).
What exactly do you mean by "Bitmap image" in your first post? Windows BMP? There's a BmpImage class that supports them. And in case it doesn't work for the BMP images you use it's quite easy to replace BmpImage by JAIImage (or a customized subclass) in FopImageFactory.
I hope for you that you can soon upgrade to the latest FOP as this stuff gets much easier (or even unnecessary). Good luck!
On 11.02.2008 12:19:30 Harshini Madurapperuma wrote:
> Hi Jeremias;
>
> Following shows the modified code and:
> RenderedImage img2 = (RenderedImage)JAI.create("ImageRead",imageSource);
> RenderedImageAdapter ria = new RenderedImageAdapter(img2);
> BufferedImage bi = ria.getAsBufferedImage();
> FopImage img = (FopImage)bi;
>
> It was like this earlier:
> FopImage img = FopImageFactory.Make(imageSource);
>
> I'm using FOP 0.20.5, anyway I have to stick to this version for now no way to change it at this moment. This is working fine for .gif, .jpg, .png images and doesn't work for Bitmap images. That's why I have changed the code.
>
> Thanks
> Harshini
>
>
>
> -----Original Message-----
> From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
> Sent: Monday, February 11, 2008 4:44 PM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: Converting BufferredImage into FopImage?
>
> Of course, you get a ClassCastException. These two classes are not related. Can you please start by explaining what you're trying to do (your overall goal, I mean). Maybe I can then guide you in the right direction.
>
> On 11.02.2008 12:03:26 Harshini Madurapperuma wrote:
> >
> > Hi All
> >
> >
> > Does anybody know how to convert a BufferredImage into a FopImage?
> > BufferredImage bi = " XXX ";
> > FopImage img = (FopImage)bi;
> >
> > When doing this I'm getting a ClassCastException.
> >
> > Regards
> > Harshini.
>
>
> Jeremias Maerki
>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
------------------------------------------------------------------------------
CONFIDENTIALITY AND DISCLAIMER NOTICE
This e-mail, including any attachments, is confidential and intended only for
the addressee. If you are not the intended recipient, please notify us
immediately and delete this e-mail from your system. Any use or disclosure of
the information contained herein is strictly prohibited.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Converting BufferredImage into FopImage?
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
I don't understand why you want to do that. There's already a
JAIImage.java which uses JAI to read bitmap images and converts a
BufferedImage into the format needed by FOP (JAIImage is a subclass of
FopImage).
What exactly do you mean by "Bitmap image" in your first post? Windows
BMP? There's a BmpImage class that supports them. And in case it doesn't
work for the BMP images you use it's quite easy to replace BmpImage by
JAIImage (or a customized subclass) in FopImageFactory.
I hope for you that you can soon upgrade to the latest FOP as this stuff
gets much easier (or even unnecessary). Good luck!
On 11.02.2008 12:19:30 Harshini Madurapperuma wrote:
> Hi Jeremias;
>
> Following shows the modified code and:
> RenderedImage img2 = (RenderedImage)JAI.create("ImageRead",imageSource);
> RenderedImageAdapter ria = new RenderedImageAdapter(img2);
> BufferedImage bi = ria.getAsBufferedImage();
> FopImage img = (FopImage)bi;
>
> It was like this earlier:
> FopImage img = FopImageFactory.Make(imageSource);
>
> I'm using FOP 0.20.5, anyway I have to stick to this version for now no way to change it at this moment. This is working fine for .gif, .jpg, .png images and doesn't work for Bitmap images. That's why I have changed the code.
>
> Thanks
> Harshini
>
>
>
> -----Original Message-----
> From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
> Sent: Monday, February 11, 2008 4:44 PM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: Converting BufferredImage into FopImage?
>
> Of course, you get a ClassCastException. These two classes are not related. Can you please start by explaining what you're trying to do (your overall goal, I mean). Maybe I can then guide you in the right direction.
>
> On 11.02.2008 12:03:26 Harshini Madurapperuma wrote:
> >
> > Hi All
> >
> >
> > Does anybody know how to convert a BufferredImage into a FopImage?
> > BufferredImage bi = " XXX ";
> > FopImage img = (FopImage)bi;
> >
> > When doing this I'm getting a ClassCastException.
> >
> > Regards
> > Harshini.
>
>
> Jeremias Maerki
>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: Converting BufferredImage into FopImage?
Posted by Harshini Madurapperuma <ha...@ifs.lk>.
Hi Jeremias;
Following shows the modified code and:
RenderedImage img2 = (RenderedImage)JAI.create("ImageRead",imageSource);
RenderedImageAdapter ria = new RenderedImageAdapter(img2);
BufferedImage bi = ria.getAsBufferedImage();
FopImage img = (FopImage)bi;
It was like this earlier:
FopImage img = FopImageFactory.Make(imageSource);
I'm using FOP 0.20.5, anyway I have to stick to this version for now no way to change it at this moment. This is working fine for .gif, .jpg, .png images and doesn't work for Bitmap images. That's why I have changed the code.
Thanks
Harshini
-----Original Message-----
From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
Sent: Monday, February 11, 2008 4:44 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Converting BufferredImage into FopImage?
Of course, you get a ClassCastException. These two classes are not related. Can you please start by explaining what you're trying to do (your overall goal, I mean). Maybe I can then guide you in the right direction.
On 11.02.2008 12:03:26 Harshini Madurapperuma wrote:
>
> Hi All
>
>
> Does anybody know how to convert a BufferredImage into a FopImage?
> BufferredImage bi = " XXX ";
> FopImage img = (FopImage)bi;
>
> When doing this I'm getting a ClassCastException.
>
> Regards
> Harshini.
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
------------------------------------------------------------------------------
CONFIDENTIALITY AND DISCLAIMER NOTICE
This e-mail, including any attachments, is confidential and intended only for
the addressee. If you are not the intended recipient, please notify us
immediately and delete this e-mail from your system. Any use or disclosure of
the information contained herein is strictly prohibited.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Converting BufferredImage into FopImage?
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Of course, you get a ClassCastException. These two classes are not
related. Can you please start by explaining what you're trying to do
(your overall goal, I mean). Maybe I can then guide you in the right
direction.
On 11.02.2008 12:03:26 Harshini Madurapperuma wrote:
>
> Hi All
>
>
> Does anybody know how to convert a BufferredImage into a FopImage?
> BufferredImage bi = " XXX ";
> FopImage img = (FopImage)bi;
>
> When doing this I'm getting a ClassCastException.
>
> Regards
> Harshini.
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Font naming and fonts used in SVG external graphics
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 19.02.2008 13:47:26 Justus-bulk wrote:
> Jeremias Maerki <de...@jeremias-maerki.ch> wrote on Tue, 19 Feb 2008
> 12:14:11 +0100:
>
> > Justus, would you mind attaching your patch to a new Bugzilla entry
>
> Done: http://issues.apache.org/bugzilla/show_bug.cgi?id=44451
Patch applied. Thanks!
> > I ... refined the font weights a bit
>
> This is about the "medium" and "demi"? I'll check it out when "svn
> update" pulls it in.
Yes, see the Bugzilla entry for details, too.
> Greetings,
> Justus
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Font naming and fonts used in SVG external graphics
Posted by Ju...@Piater.name.
Jeremias Maerki <de...@jeremias-maerki.ch> wrote on Tue, 19 Feb 2008
12:14:11 +0100:
> Justus, would you mind attaching your patch to a new Bugzilla entry
Done: http://issues.apache.org/bugzilla/show_bug.cgi?id=44451
> I ... refined the font weights a bit
This is about the "medium" and "demi"? I'll check it out when "svn
update" pulls it in.
Greetings,
Justus
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Font naming and fonts used in SVG external graphics
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Justus, would you mind attaching your patch to a new Bugzilla entry, so
we have a Bugzilla ID I can reference? I've looked at the patch and find
it to be an improvement indeed. I've locally applied it and tested it. I
had to remove some tab characters (which we don't like) and refined the
font weights a bit but there's no need for you to change your patch.
Thanks for the patch!!!
On 18.02.2008 14:27:42 Justus-bulk wrote:
> Justus-bulk@Piater.name wrote on Mon, 18 Feb 2008 08:16:12 +0100:
>
> > Having pondered this for a while, I now think this would actually be
> > the cleaner solution. I'll soon send another patch.
>
> This was easy... I do like this one better. Jeremias?
>
> Justus.
>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Font naming and fonts used in SVG external graphics
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Turns out this usWeightClass value is much less useful than our font
weight guessing. I hooked in code so we can extract the value but we're
not going to use it for now.
On 19.02.2008 15:34:03 Jeremias Maerki wrote:
> To address your question I found in the patch:
> > // Isn't weight information contained in the font file??:
>
> Not necessarily. There's a usWeightClass value in the "OS/2" table which
> I only found just now. I guess we should make use of that value as it
> seems to correspond to the XSL font-weight values. However, in Type 1
> font you don't have such information at all. There you really only can
> derive the font weights from the font names.
<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: Font naming and fonts used in SVG external graphics
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
To address your question I found in the patch:
> // Isn't weight information contained in the font file??:
Not necessarily. There's a usWeightClass value in the "OS/2" table which
I only found just now. I guess we should make use of that value as it
seems to correspond to the XSL font-weight values. However, in Type 1
font you don't have such information at all. There you really only can
derive the font weights from the font names.
On 18.02.2008 14:27:42 Justus-bulk wrote:
> Justus-bulk@Piater.name wrote on Mon, 18 Feb 2008 08:16:12 +0100:
>
> > Having pondered this for a while, I now think this would actually be
> > the cleaner solution. I'll soon send another patch.
>
> This was easy... I do like this one better. Jeremias?
>
> Justus.
>
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Font naming and fonts used in SVG external graphics
Posted by Ju...@Piater.name.
Justus-bulk@Piater.name wrote on Mon, 18 Feb 2008 08:16:12 +0100:
> Having pondered this for a while, I now think this would actually be
> the cleaner solution. I'll soon send another patch.
This was easy... I do like this one better. Jeremias?
Justus.
Re: Font naming and fonts used in SVG external graphics
Posted by Ju...@Piater.name.
Jeremias,
Hold on with the current patch:
Justus-bulk@Piater.name wrote on Sun, 17 Feb 2008 17:54:17 +0100:
> (An alternative solution would be to store the priorities
> in a separate HashMap. This would require additional put()s and
> get()s, but would slightly shorten the code and would have the
> advantage that once addFontProperties() is done, all remains the
> same as before.)
Having pondered this for a while, I now think this would actually be
the cleaner solution. I'll soon send another patch.
Justus
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Font naming and fonts used in SVG external graphics
Posted by Ju...@Piater.name.
Jeremias,
Here's a patch. It fixes the DejaVu Condensed problem as well as my
Nimbus problem, as well as other problems of the same sort that
surfaced during testing. It is somewhat less clean a solution than I
had hoped; however, I cannot currently think of anything substantially
better short of a full-fledged, configurable font fallback system.
Jeremias Maerki <de...@jeremias-maerki.ch> wrote on Tue, 12 Feb 2008
09:46:35 +0100:
>> > - If the triplet exists already and the family name equals the full name
>> > then replace the triplet.
This does not quite cut it, as it does not properly resolve things in
cases where neither of the colliding family names equal the full
name.
Here's my new heuristic: The more similar the family name to the full
name, the higher the priority of the family-name triplet.
Here is a brief account of my changes:
- In FontInfoFinder.generateTripletsFromFont(), triplets are assigned
a priority based on a crude approximation to the above heuristic.
- This priority is added to the FontTriplet.
- In FontInfo.java, the triplets Map now maps to an object that, in
addition to the "font key", now contains a reference back to the
triplet so that FontInfo.addFontProperties() can access its
priority. (An alternative solution would be to store the priorities
in a separate HashMap. This would require additional put()s and
get()s, but would slightly shorten the code and would have the
advantage that once addFontProperties() is done, all remains the
same as before.)
- FontInfo.addFontProperties() now checks for triplet collisions and
resolves them by simply comparing the priorities stored in the
FontTriplets.
This solved *all* of my DejaVu Condensed and related problems. I made
some other minor changes along the way:
- To solve the Nimbus problem where bold and italic fonts replaced the
correct, normal fonts (as well as related problems involving other
URW Type-1 fonts), I added "medium" and "demi" to the
BOLD_WORDS. (According to FontForge, my "medium" fonts are
explicitly marked bold; in URW Gothic "demi" is used as a font
weight, and the "Demi" font is heavier than "Book".)
- These words appear truncated in some of my font names; therefore, in
FontInfoFinder.generateTripletsFromFont() searchName is now based on
fullName instead of on fontName.
- I fixed a couple of unrelated comments along the way.
Justus
Re: Font naming and fonts used in SVG external graphics
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 12.02.2008 09:08:44 Justus wrote:
> Jeremias Maerki <de...@jeremias-maerki.ch> wrote on Mon, 11 Feb 2008
> 09:21:10 +0100:
>
> > On 09.02.2008 21:43:12 Justus-bulk wrote:
> >
> >> one might prefer the non-condensed "DejaVu Serif" triple since the
> >> font full name and the family name are in agreement, whereas they
> >> aren't for the condensed font.
> >
> > ...the logic should probably be:
> > - Generate the "family" triplet for any font of that family if it does
> > not exist already.
> > - If the triplet exists already and the family name equals the full name
> > then replace the triplet.
>
> OK, we agree on this one, but with the following one I apparently was
> not clear:
>
> >> What is the semantics of multiple family names? Is there an order of
> >> preference? In this case, one could change Fop to drop the condensed
> >> "DejaVu Serif" triple since "DejaVu Serif" is its second family name,
> >> whereas it is the first family name of the non-condensed font.
> >
> > The problem here is that you don't know in which order the discovered
> > fonts arrive for the registration
>
> I was not talking about the order in which the fonts are processed,
> but about the order of the individual family names of a given font. Is
> this order significant? Are there any formal specifications about
> this? If so, one could prioritize the triplets based on the rank of
> the family name.
I don't know of any formal specifications about family names. Each font
designer is free to choose the value for the font family. I've seen
differing approaches in the past.
The order of the registration in FOP is significant if there are
duplicate registrations. One font will win and if we don't be careful
it's the wrong one (see below). This really relates to the above rule we
both agree on. It's the same topic for me.
> If there are no specified semantics about family name ranking, we
> should probably not worry about them until it solves a concrete
> problem. My particular case will be solved by the simpler "equality"
> heuristic.
Ok, part of the problematic code is in
FontInfoFinder.generateTripletsFromFont(). The problem is really that
this method doesn't have any access to the other triplets that have
already been generated. Maybe this can also be resolved at the point
where the font is selected. But the "mixing" currently occurs in
FontInfo.addFontProperties() where a (Triplet-)Map is populated. Values
are overwritten there without checking if there's already a "better"
value in there already. If you want to give it a try, feel free...
>
> Justus
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Font naming and fonts used in SVG external graphics
Posted by Ju...@Piater.name.
Jeremias Maerki <de...@jeremias-maerki.ch> wrote on Mon, 11 Feb 2008
09:21:10 +0100:
> On 09.02.2008 21:43:12 Justus-bulk wrote:
>
>> one might prefer the non-condensed "DejaVu Serif" triple since the
>> font full name and the family name are in agreement, whereas they
>> aren't for the condensed font.
>
> ...the logic should probably be:
> - Generate the "family" triplet for any font of that family if it does
> not exist already.
> - If the triplet exists already and the family name equals the full name
> then replace the triplet.
OK, we agree on this one, but with the following one I apparently was
not clear:
>> What is the semantics of multiple family names? Is there an order of
>> preference? In this case, one could change Fop to drop the condensed
>> "DejaVu Serif" triple since "DejaVu Serif" is its second family name,
>> whereas it is the first family name of the non-condensed font.
>
> The problem here is that you don't know in which order the discovered
> fonts arrive for the registration
I was not talking about the order in which the fonts are processed,
but about the order of the individual family names of a given font. Is
this order significant? Are there any formal specifications about
this? If so, one could prioritize the triplets based on the rank of
the family name.
If there are no specified semantics about family name ranking, we
should probably not worry about them until it solves a concrete
problem. My particular case will be solved by the simpler "equality"
heuristic.
Justus
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Converting BufferredImage into FopImage?
Posted by Harshini Madurapperuma <ha...@ifs.lk>.
Hi All
Does anybody know how to convert a BufferredImage into a FopImage?
BufferredImage bi = " XXX ";
FopImage img = (FopImage)bi;
When doing this I'm getting a ClassCastException.
Regards
Harshini.
------------------------------------------------------------------------------
CONFIDENTIALITY AND DISCLAIMER NOTICE
This e-mail, including any attachments, is confidential and intended only for
the addressee. If you are not the intended recipient, please notify us
immediately and delete this e-mail from your system. Any use or disclosure of
the information contained herein is strictly prohibited.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Font naming and fonts used in SVG external graphics
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 09.02.2008 21:43:12 Justus-bulk wrote:
> Jeremias -
>
> I have found the cause for this one:
>
> Justus-bulk@Piater.name wrote on Thu, 07 Feb 2008 10:18:37 +0100:
>
> > - The two DejaVu fonts ("DejaVu Sans" and "DejaVu Serif") are
> > condensed.
>
> - DejaVuSerif.ttf calls declares the family name "DejaVu Serif", and
> DejaVuSerifCondensed.ttf declares the family names "DejaVu Serif
> Condensed" and "DejaVu Serif".
>
> - FontInfoFinder.generateTripletsFromFont() registers triplets for all
> (distinct) family names a font declares.
>
> I have not checked how Fop resolves this conflict, but of course, one
> font is chosen in the end, and for me it's the condensed font that
> wins.
>
> It seems odd to me that two DejaVu fonts declare the same family name.
Not really. The family name is just the name for a whole set of fonts
including variants such as "Condensed". The tricky thing is to recognize
the "main" font. Right now, there's no conflict resolution code for such
situations which is why you stumbled over this problem, I guess.
> What is the semantics of multiple family names? Is there an order of
> preference? In this case, one could change Fop to drop the condensed
> "DejaVu Serif" triple since "DejaVu Serif" is its second family name,
> whereas it is the first family name of the non-condensed font.
>
> Or (or And, in case of ties), one might prefer the non-condensed
> "DejaVu Serif" triple since the font full name and the family name are
> in agreement, whereas they aren't for the condensed font.
> Might be a useful heuristics...
>
> Justus
The problem here is that you don't know in which order the discovered
fonts arrive for the registration, so the logic should probably be:
- Generate the "family" triplet for any font of that family if it does
not exist already.
- If the triplet exists already and the family name equals the full name
then replace the triplet.
So if you don't have the regular DejaVu Serif but only the Condensed
variant, you could still access the font using "DejaVu Serif".
Do you want to try improving the code? If not, please open a Bugzilla
task for me referencing this thread I'll see if I can find a bit of time
somewhere in between.
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Font naming and fonts used in SVG external graphics
Posted by Ju...@Piater.name.
Jeremias -
I have found the cause for this one:
Justus-bulk@Piater.name wrote on Thu, 07 Feb 2008 10:18:37 +0100:
> - The two DejaVu fonts ("DejaVu Sans" and "DejaVu Serif") are
> condensed.
- DejaVuSerif.ttf calls declares the family name "DejaVu Serif", and
DejaVuSerifCondensed.ttf declares the family names "DejaVu Serif
Condensed" and "DejaVu Serif".
- FontInfoFinder.generateTripletsFromFont() registers triplets for all
(distinct) family names a font declares.
I have not checked how Fop resolves this conflict, but of course, one
font is chosen in the end, and for me it's the condensed font that
wins.
It seems odd to me that two DejaVu fonts declare the same family name.
What is the semantics of multiple family names? Is there an order of
preference? In this case, one could change Fop to drop the condensed
"DejaVu Serif" triple since "DejaVu Serif" is its second family name,
whereas it is the first family name of the non-condensed font.
Or (or And, in case of ties), one might prefer the non-condensed
"DejaVu Serif" triple since the font full name and the family name are
in agreement, whereas they aren't for the condensed font.
Might be a useful heuristics...
Justus
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Font naming and fonts used in SVG external graphics
Posted by Ju...@Piater.name.
Jeremias Maerki <de...@jeremias-maerki.ch> wrote on Wed, 06 Feb 2008
20:52:48 +0100:
> Please delete the cache file and check if it gets any better. :-)
Progress after deleting fop-fonts.cache! I've updated the files on my
Web server.
- For the "official" font names (as used by Inkscape et al.), the
output for SVG text and fo text is identical except for the DejaVu
fonts, see below. pdffonts produces the exact same output for both.
Almost all fonts are correct now; there are only two problems that
remain:
- All Nimbus fonts are italic; in addition, Nimbus Roman is
bold. This is consistent between SVG and fo text.
- The two DejaVu fonts ("DejaVu Sans" and "DejaVu Serif") are
condensed. Here, the characters in SVG text are slightly more
widely spaced than those in fo text; I suspect that Batik used the
(correct) non-condensed font metrics to place the characters,
whereas fop used the condensed fonts (including their metrics for
fo text).
- There should be no reason anymore to look into the "wrong" font
names, but I'll do it anyway because one of the inconsistencies I
observe may shed light onto the preceding issue concerning DejaVu
fonts (here called "DejaVuSans" and "DejaVuSerif" without spaces):
- fo text uses the correct (non-condensed) fonts.
- SVG text however produces the exact same result as above:
condensed font, using (apparently) non-condensed metrics.
Does this information already help you? If not, I'll try your
debugging suggestions, but it may take a while until I get around to
it.
Thanks,
Justus
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Font naming and fonts used in SVG external graphics
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 06.02.2008 18:44:13 Justus-bulk wrote:
<snip/>
> > On 05.02.2008 20:26:55 Justus-bulk wrote:
> >
> >> - There seems to be an issue with Fop embedding fonts required by SVG:
> >> Font names that both Batik and Fop process correctly are not
> >> necessarily processed correctly by Fop if they occur in embedded
> >> SVG.
>
> What could it be then?
>
> I do in fact run Linux. Let me know how I can help; are there any
> debugging options, or you might instrument the code with debug
> statements and send me diffs or a tarball so I can test it... Or maybe
> I'm doing something stupid?
>
> For kicks, I attach my fop-fonts.cache. Perhaps you find a clue
> there...
Actually, this is a good topic, one that I didn't think about. Please
delete the cache file and check if it gets any better. :-) Maybe there's
some unwanted side-effect after the update. Maybe we should include a
version number somehow so we can trigger an automatic garbage removal if
we have improvements in this area. Deleting the cache file is my first
suggestion.
If that does not already fix the problem:
If you want to do something on your side, I'd like to point you to
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFTextPainter.java?view=markup
If you set a breakpoint in the findFonts() method you can see what Batik
uses internally. The possible mismatch between the O/S, Batik and FOP
comes from this: Batik mostly uses Java's font subsystem to work with
fonts. If we generate PDF we have to use PDF's infrastructure and the
Java2D fonts are not a good source for all the font data we need. That's
why we have our own font subsystem. Now, the findFonts() method tries to
map the OS/Java font to a font in FOP's font subsystem. If the names
and styles match, it works. If they don't, a fallback is used which
leads to the problems you describe. It would be helpful if you could
identify what's coming from Batik and what FOP's answer is.
You can also set the org.apache.fop.fonts logging category to FINE level
to see how FOP registers the fonts it finds.
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Font naming and fonts used in SVG external graphics
Posted by Ju...@Piater.name.
Jeremias,
I have updated my svn checkout, with the result that the DejaVu fonts
are now correctly displayed everywhere (I've updated the files on my
Web server). Good job! The other problems persist however.
Jeremias Maerki <de...@jeremias-maerki.ch> wrote on Wed, 06 Feb 2008
16:36:38 +0100:
> FOP Trunk works fine for me (svgtext.fo + text.svg) ... I've
> attached the PDF I generated with the latest FOP Trunk
Beautiful indeed :-)
> and the config file I used
Mine is identical, except that I have
<strict-configuration>true</strict-configuration> and two <directory>
entries in addition to the <auto-detect/>.
> Maybe you're on a Unix which may behave differently for some
> reason. But I can't test that. But if Batik Squiggle displays the
> SVG fine then it can't be that.
Yes, weird:
> On 05.02.2008 20:26:55 Justus-bulk wrote:
>
>> - There seems to be an issue with Fop embedding fonts required by SVG:
>> Font names that both Batik and Fop process correctly are not
>> necessarily processed correctly by Fop if they occur in embedded
>> SVG.
What could it be then?
I do in fact run Linux. Let me know how I can help; are there any
debugging options, or you might instrument the code with debug
statements and send me diffs or a tarball so I can test it... Or maybe
I'm doing something stupid?
For kicks, I attach my fop-fonts.cache. Perhaps you find a clue
there...
Thanks,
Justus
Re: Font naming and fonts used in SVG external graphics
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
I'm not sure what you're doing wrong but FOP Trunk works fine for me
(svgtext.fo + text.svg) except for the following:
- The STIXGeneral I have has CFF glyphs which don't work with FOP.
- The Nimbus fonts I have (from GhostScript) don't even install in WinXP
so I can't test that. [1]
[1] There is a restriction for Type 1 fonts until we can parse AFM or
PFB files as the PFM file we use for font metrics doesn't contain the
right font name we need for auto-configuration.
I've attached the PDF I generated with the latest FOP Trunk and the
config file I used (all fonts are installed in my WinXP). Maybe you're
on a Unix which may behave differently for some reason. But I can't test
that. But if Batik Squiggle displays the SVG fine then it can't be that.
I've been able to invest a lot of time last October to make text
painting in SVG near-perfect. Furthermore, I've invested some work to
make font-auto-registration better. It now properly registers (TrueType)
fonts with names including spaces. If that doesn't happen at your end I
have to suspect you're not using a current FOP Trunk. Can you please
verify that?
On 05.02.2008 20:26:55 Justus-bulk wrote:
> Hi,
>
> I've run into the following issue; see
> http://www.intelsig.be/~piater/nobackup/fop/svgfonts/ for the
> accompanying files:
>
> - I've created a simple file text.svg with Inkscape containing text in
> different TrueType fonts and three Nimbus Type-1 fonts. It displays
> OK in Firefox and Batik (squiggle).
>
> - If I include this file in svgtext.fo and process it with fop
> (trunk), the resulting svgtext.pdf appears to contain only fonts
> without spaces in their (Inkscape-assigned) names, with the
> exception of the Type-1 font Nimbus Sans L, which is included as
> NimbusSanL-Regu.
>
> Fonts whose names contain spaces appear to be typeset using the
> correct metrics, but the fonts are not embedded in the PDF.
>
> - I created a file texttext.fo with the same content as text.svg. The
> resulting texttext.pdf is equivalent to svgtext.pdf.
>
> - I then removed the spaces in the TTF font names and adapted the
> Nimbus names in text.svg and texttext.fo, naming the resulting files
> textfop.svg and texttextfop.fo. The resulting texttextfop.pdf is
> perfect, but svgtextfop.pdf remains equivalent to svgtext.pdf; no
> improvement.
>
> textfop.svg is still displayed correctly by Inkscape, Firefox and
> Batik, except for the three Nimbus fonts, and Inkscape's font dialog
> no longer displays the correct font names for any of the hand-edited
> font names.
>
> So, there seem to be two issues that perhaps go back to the same root:
>
> - Fop does not appear to recognize fonts under the same names as other
> programs do (Inkscape, but also OpenOffice.org). This appears to be
> linked to spaces in TTF filenames, but the Nimbus (Type 1) story is
> slightly different.
>
> - There seems to be an issue with Fop embedding fonts required by SVG:
> Font names that both Batik and Fop process correctly are not
> necessarily processed correctly by Fop if they occur in embedded
> SVG. (If I add textfop.svg to texttextfop.fo, the resulting SVG text
> is still broken, even though the fonts are embedded and correctly
> used by the fo:block text; this is independent on the order of
> inclusion.)
>
> Justus
Jeremias Maerki