[ANN] Apache FOP 0.95 Released

2008-08-06 Thread Jeremias Maerki
Apache FOP (Formatting Objects Processor) is a print formatter driven by
XSL Formatting Objects [1] and an output independent formatter. It is a
Java application that reads a formatting object tree and renders the
resulting pages to a specified output. Output formats currently
supported include PDF, PS, PCL, AFP, Print and TIFF/PNG. Apache FOP is
Open Source software and published under the Apache License v2.0.

It took longer than expected but we're happy to present the final Apache
FOP 0.95 stable release. This is basically a bugfix release to 0.95beta.
The most important changes since the previous stable release (0.94) are:
- many bug fixes and improvements in tables, better support for keeps
  and breaks, new features: conditional borders and background on
  columns and header/footer/body;
- better image handling thanks to the new image loading framework
  provided by the Apache XML Graphics Commons dependency;
- improvements and bugfixes for font handling and font
  auto-detection/-registration;
- performance improvements and memory optimizations for the property
  handling in the FO tree.
- elimination of a potential multi-threading problem.
- some feature enhancements for RTF output (partial fo:leader support,
  fo:page-number-citation)

Please note that support for Java 1.3 has been dropped. Only one type of
binaries is provided now, that will run on 1.4+ JREs.

Other important release notes are available at
http://xmlgraphics.apache.org/fop/0.95/releaseNotes_0.95.html

For a more complete list of changes, please visit
http://xmlgraphics.apache.org/fop/0.95/changes_0.95.html

For download information, see the following page:
http://xmlgraphics.apache.org/fop/download.html


[1] http://www.w3.org/TR/xsl11/


On behalf of the Apache XML Graphics team,
Jeremias Maerki


pgptJG4dMpMkc.pgp
Description: PGP signature


Re: Embedding Fonts

2008-08-06 Thread Jeremias Maerki
I'm not aware of such problems. When FOP is run from the command-line,
it just runs once and there are no such problems. The way FOP is called
is quite similar to when it's embedded in a servlet. But then, what does
it only works the second time mean? Are there error messages the first
time? If yes, which? Have you tried with different browsers?

My gut feeling is that you've either got a problem in your servlet code
or a communication problem between the browser and the servlet. Please
make sure you've read the tips on this page:
http://xmlgraphics.apache.org/fop/0.95/servlets.html

On 05.08.2008 19:52:15 John T wrote:
 
 Hello. I am embedding fonts in my PDF and it seems to be working. However, it
 only works the second  time I call my servlet and subsequet times. Has
 anyone seen this behaviour before or know the cause of such a behaviour? The
 servlet is runing on BEA Weblogic v8.1 on a Windows XP desktop. FOP version
 is 0.94
 
 Thanks
 John
 -- 
 View this message in context: 
 http://www.nabble.com/Embedding-Fonts-tp18836519p18836519.html
 Sent from the FOP - Users mailing list archive at Nabble.com.
 



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can FOP use a Rendered/BufferedImage rather than a JPEG or GIF? (was: Can FOP render my PNG's with transparent backgrounds)

2008-08-06 Thread Jeremias Maerki
Please don't hijack threads, or at least change the subject. Thanks!

To your question: I assume, by Java image, you mean a BufferedImage or
a RenderedImage? At the moment, this is not implemented, although the
new image loading framework is prepared to support it. The easiest way
is to use ImageIO to save the bitmap to a PNG and to pass it to FOP
either through a servlet or a custom URIResolver.

On 05.08.2008 23:35:02 BVN wrote:
 
 Can you add java image? or do we have to use ImageIO to save that java image
 as jpeg/gif and attach that? Please let me know.
 
 -bvn
snip/ 



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: 0.95beta out of the wilderness?

2008-08-06 Thread Jeremias Maerki
On 06.08.2008 01:02:21 Kamal Bhatt wrote:
 
 Kamal Bhatt wrote:  Jeremias Maerki wrote: min-height is the (more or less) 
 same as block-progression-dimension.minimum which already works with 0.95. 
 min-height and max-height are so-called corresponding properties and are 
 only in FO for CSS compatibility. See: http://www.w3.org/TR/xsl11/#min-height
 OK, in which case, I have another reason to upgrade :)
 Well, that was a waste of half a day. block-progression-dimension.minimum 
 works in 0.93. Question about this.
 
 I have this code:
 
 fo:table-body
   fo:table-row
 fo:table-cell font-size=7.5pt font-weight=bold 
 background-color=#DCE3E9 display-align=center
   border-color=white border-style=solid 
 border-bottom-style=none
   fo:block
 fo:block margin-bottom=1mm margin-top=1.5mm 
 margin-left=1mm
   IBadfasfd
 /fo:block
   /fo:block
 /fo:table-cell
 fo:table-cell number-rows-spanned=2 font-size=7.5pt 
 line-height=1.4 background-color=#DCE3E9
   display-align=center border-color=white 
 border-style=solid border-left-style=none 
 block-progression-dimension.minimum=45mm
   fo:block
 fo:block margin-bottom=1mm margin-left=3mm 
 margin-top=3mm 
   fo:blockblah/fo:block
   fo:blockblah/fo:block
   fo:blockTb;ah/fo:block
   fo:blockblah/fo:block
   fo:block font-size=7.5pt font-weight=bold 
 margin-top=3mmasdft/fo:block
   fo:block font-size=7.5pt font-weight=bold 
 margin-top=3mmasdf/fo:block
   fo:block font-size=7.5pt font-weight=bold 
 margin-top=3mmasdf/fo:block
   fo:block font-size=7.5pt font-weight=bold 
 margin-top=3mmasdf/fo:block
   fo:block font-size=7.5pt font-weight=bold 
 margin-top=3mmasdf/fo:block
   fo:block font-size=7.5pt font-weight=bold 
 margin-top=3mmasdf/fo:block
   fo:block font-size=7.5pt font-weight=bold 
 margin-top=3mmasdf/fo:block
 /fo:block
   /fo:block
 /fo:table-cell
   /fo:table-row
   fo:table-row
 fo:table-cell font-size=7.5pt line-height=1.4 
 background-color=#EBF1F6 display-align=center
   border-color=white border-style=solid
   fo:block margin-bottom=1mm margin-top=0mm 
 margin-left=3mm
 TTESTESTETSTEET
   /fo:block
   fo:block margin-bottom=1mm margin-top=0mm 
 margin-left=3mm
 asdfasdf
   /fo:block
 /fo:table-cell
   /fo:table-row
 /fo:table-body
 
 Now, when I run this, it works, but if I put the
 block-progression-dimension.minimum=45mm on the block (instead of the
 table) it doesn't work. My reading of the standard is that it should be.
 What am I missing?

How do you get to that impression? block-progression-dimension doesn't
apply to fo:block (and therefore doesn't have any effect). Either put it
back on the cell or row, or use an fo:block-container which supports
block-progression-dimension.

See: http://www.w3.org/TR/xsl11/#fo_block
And: http://www.w3.org/TR/xsl11/#prapply

 Also, I want subsequent pages to have the same height, how can I achieve this?

I don't know what you mean. If you have your page-master setup right,
you always get pages of the same height if content spans over multiple
pages.

snip/



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FOP - FONTS - expl. verdana

2008-08-06 Thread lmhelp

Thank you again for your answer.

 Awfully weird, though.
Yes...

About the double quotes
---
  You are right, if I copy the following string as an URL in my browser,
  file:///C:\Program Files\fop\fonts_lea,
  the directory is not found.

  Whereas if I use file:///C:\Program Files\fop\fonts_lea
  it is escaped to file:///C:\Program%20Files\fop\fonts_lea
  and the directory is properly found.

  So I deleted the double quotes, thanks.

About the trailing backslash

  I added one.
  This is now what it looks like:
  valuefile:///C:\Program Files\fop\fonts_lea\/value

  Unfortunately, it is still failing with the same error message.

Fop -d command line option
--
  So, I tried:
  # fop -c C:\Program Files\fop\conf\userconfig.xml -xml projectteam.xml \
-xsl projectteam2fo.xsl -pdf projectteam.pdf -d
  but no more clues appear, snif!

  BTW, can you tell me what IIC means?

Thank you for your concern.

--
Lmhelp
-- 
View this message in context: 
http://www.nabble.com/FOP---FONTS---expl.-verdana-tp18836748p18847106.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: 0.95beta out of the wilderness?

2008-08-06 Thread Vincent Hennebert
Hi,

Kamal Bhatt wrote:
snip/
 Also, I want subsequent pages to have the same height, how can 
 I achieve this?

If you mean that the content should always end at a same distance from
the bottom of each page (‘justified’ pages), then you have to insert
elastic spaces between blocks, like this:
fo:block space-after.minimum=10pt
  space-after.optimum=12pt
  space-after.maximum=20pt
  etc...
(Also works on fo:table.)

Spaces will then be stretched so that the bottom of the content
coincides with the bottom of the region-body on each page.


HTH,
Vincent

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FOP - FONTS - expl. verdana

2008-08-06 Thread Jeremias Maerki
Why don't you make your life easier and upgrade to Apache FOP 0.95 and
use the directory tag to automatically register your fonts in FOP?
http://xmlgraphics.apache.org/fop/0.95/fonts.html#basics
No more XML font metric files and font base URL.

Just: directoryC:\Program Files\fop\fonts_lea/directory
(not possible with 0.20.5)

Otherwise, I'd replace all the backslashes with slashes in your file URL.
URLs use forward slashes. Only Windows file paths use backslashes. Not
that this is likely the problem here but who knows.
 file:///C:/Program%20Files/fop/fonts_lea

On 06.08.2008 11:06:49 lmhelp wrote:
 
 Thank you again for your answer.
 
  Awfully weird, though.
 Yes...
 
 About the double quotes
 ---
   You are right, if I copy the following string as an URL in my browser,
   file:///C:\Program Files\fop\fonts_lea,
   the directory is not found.
 
   Whereas if I use file:///C:\Program Files\fop\fonts_lea
   it is escaped to file:///C:\Program%20Files\fop\fonts_lea
   and the directory is properly found.
 
   So I deleted the double quotes, thanks.
 
 About the trailing backslash
 
   I added one.
   This is now what it looks like:
   valuefile:///C:\Program Files\fop\fonts_lea\/value
 
   Unfortunately, it is still failing with the same error message.
 
 Fop -d command line option
 --
   So, I tried:
   # fop -c C:\Program Files\fop\conf\userconfig.xml -xml projectteam.xml \
 -xsl projectteam2fo.xsl -pdf projectteam.pdf -d
   but no more clues appear, snif!
 
   BTW, can you tell me what IIC means?
 
 Thank you for your concern.
 
 --
 Lmhelp
 -- 
 View this message in context: 
 http://www.nabble.com/FOP---FONTS---expl.-verdana-tp18836748p18847106.html
 Sent from the FOP - Users mailing list archive at Nabble.com.
 
 



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FOP - FONTS - expl. verdana

2008-08-06 Thread lmhelp

Thank you.
This was what I was doing when I received your answer... !
I will let you know if it works or not when I have finished.
Thanks.

--
Lmhelp
-- 
View this message in context: 
http://www.nabble.com/FOP---FONTS---expl.-verdana-tp18836748p18847919.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FOP - FONTS - expl. verdana

2008-08-06 Thread Chris Bowditch

lmhelp wrote:

Hi,


Thank you again for your answer.



Fop -d command line option
--
  So, I tried:
  # fop -c C:\Program Files\fop\conf\userconfig.xml -xml projectteam.xml \
-xsl projectteam2fo.xsl -pdf projectteam.pdf -d
  but no more clues appear, snif!


Please can you provide the command line output, so list members can 
evaluate the error?




  BTW, can you tell me what IIC means?


IIC = If I'm Correct



Thank you for your concern.


Thanks,

Chris



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FOP - FONTS - expl. verdana

2008-08-06 Thread lmhelp

Hi,

 Please can you provide the command line output, so list members can 
 evaluate the error?
This is exactly the same output as the one of one of the previous posts.
Here is it:

[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] FOP 0.20.5
[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[INFO] building formatting object tree
[INFO] setting up fonts
[ERROR] Failed to read a font metrics file: Invalid font metrics file: null
(spec must not be null)
[INFO] [1]
[ERROR] unknown font verdana,normal,normal so defaulted font to any
[ERROR] unknown font verdana,normal,normal so defaulted font to any
[ERROR] unknown font verdana,normal,normal so defaulted font to any
[ERROR] unknown font verdana,normal,normal so defaulted font to any
[ERROR] unknown font verdana,normal,normal so defaulted font to any
[ERROR] unknown font verdana,normal,normal so defaulted font to any
[ERROR] unknown font verdana,normal,normal so defaulted font to any
[ERROR] unknown font verdana,normal,normal so defaulted font to any
[ERROR] unknown font verdana,normal,normal so defaulted font to any
[ERROR] unknown font verdana,normal,normal so defaulted font to any
[INFO] Parsing of document complete, stopping renderer 

 IIC = If I'm Correct
Oook, thank you for the precision.

--
Lmhelp
-- 
View this message in context: 
http://www.nabble.com/FOP---FONTS---expl.-verdana-tp18836748p18848495.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FOP - FONTS - expl. verdana

2008-08-06 Thread Jeremias Maerki
On 06.08.2008 12:33:34 lmhelp wrote:
 
 Hi,
 
  Please can you provide the command line output, so list members can 
  evaluate the error?
 This is exactly the same output as the one of one of the previous posts.
 Here is it:
 
 [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
 [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
 [INFO] FOP 0.20.5
 [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
 [INFO] building formatting object tree
 [INFO] setting up fonts
 [ERROR] Failed to read a font metrics file: Invalid font metrics file: null
 (spec must not be null)

Aha, that gives me a hint. If I remember correctly, FOP 0.20.5 required
plain filenames in the font area. We later changed metrics-file to
metrics-url. So in 0.20.5 you can't use URLs at all.

 [INFO] [1]
 [ERROR] unknown font verdana,normal,normal so defaulted font to any
 [ERROR] unknown font verdana,normal,normal so defaulted font to any
 [ERROR] unknown font verdana,normal,normal so defaulted font to any
 [ERROR] unknown font verdana,normal,normal so defaulted font to any
 [ERROR] unknown font verdana,normal,normal so defaulted font to any
 [ERROR] unknown font verdana,normal,normal so defaulted font to any
 [ERROR] unknown font verdana,normal,normal so defaulted font to any
 [ERROR] unknown font verdana,normal,normal so defaulted font to any
 [ERROR] unknown font verdana,normal,normal so defaulted font to any
 [ERROR] unknown font verdana,normal,normal so defaulted font to any
 [INFO] Parsing of document complete, stopping renderer 
 
  IIC = If I'm Correct
 Oook, thank you for the precision.
 
 --
 Lmhelp
 -- 
 View this message in context: 
 http://www.nabble.com/FOP---FONTS---expl.-verdana-tp18836748p18848495.html
 Sent from the FOP - Users mailing list archive at Nabble.com.
 




Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FOP - FONTS - expl. verdana

2008-08-06 Thread lmhelp

Thank you Jeremias.

Hi everyone,

So, I've upgraded to fop-0.95.

I've added the following line to the ../fop-0.95/conf/fop.xconf file:
  directoryC:/Program Files/fop-0.95/fonts_lea//directory
(Maybe this is not the right file to update... ?)


Here is the whole configuration file (fop.xconf) as it is now:

?xml version=1.0?

fop version=1.0

  base./base
  
  source-resolution72/source-resolution
  target-resolution72/target-resolution
  
  default-page-settings height=11in width=8.26in/
  
  renderers
renderer mime=application/pdf
  filterList
valueflate/value
  /filterList

  fonts
directoryC:/Program Files/fop-0.95/fonts_lea//directory
  /fonts
/renderer

renderer mime=application/postscript
/renderer

renderer mime=application/vnd.hp-PCL
/renderer

renderer mime=image/svg+xml
  format type=paginated/
  link value=true/
  strokeText value=false/
/renderer

renderer mime=application/awt
/renderer

renderer mime=image/png
/renderer

renderer mime=image/tiff
/renderer

renderer mime=text/xml
/renderer

renderer mime=text/plain
  pageSize columns=80/
/renderer

  /renderers

/fop

The C:/Program Files/fop-0.95/fonts_lea/ directory contains the TTF file
verdana.ttf
which I copied from C:/WINDOWS/Fonts.

(Tell me if I am wrong:)
if your TTF file's name is fontname.ttf then the font name you have to use 
in the xsl-fo file is fontname (for example: fo:block
font-family=fontname)
to get it work.

Once having done that, I launched the following command:
# fop -c C:\Program Files\fop-0.95\conf\fop.xconf -xml projectteam.xml \
  -xsl projectteam2fo.xsl -pdf projectteam.pdf
and it worked.
But I had to put the -c option above...

See you.
-- 
View this message in context: 
http://www.nabble.com/FOP---FONTS---expl.-verdana-tp18836748p18849018.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FOP - FONTS - expl. verdana

2008-08-06 Thread John Brown
lmhelp lmbox at wanadoo.fr writes:

 
 
 Thank you Jeremias.
 
 Hi everyone,
 
 So, I've upgraded to fop-0.95.
 
 I've added the following line to the ../fop-0.95/conf/fop.xconf file:
   directoryC:/Program Files/fop-0.95/fonts_lea//directory
 (Maybe this is not the right file to update... ?)


1) Did you run 'fop -c ../fop-0.95/conf/fop.xconf FO-file PDF-file'?
If you did and it didn't work, add the auto-detect tag:

fonts
  directoryC:/Program Files/fop-0.95/fonts_lea//directory
  auto-detect
/fonts

Also, if the font is in C:\Windows\Fonts, then you might not
even need the directory tag, as I would imagine that
C:\Windows\Fonts is one of the standard locations checked when
auto-detect is enabled.

2) Maybe it does not like the space in Program Files. Try the
short name instead:

C:/Progra~1/fop-0.95_lea

I don't think that the trailing / is necessary, but don't quote me.
I don't have a trailing / in my fop.xconf.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FOP - FONTS - expl. verdana

2008-08-06 Thread Jeremias Maerki
On 06.08.2008 13:12:28 lmhelp wrote:
 
 Thank you Jeremias.
 
 Hi everyone,
 
 So, I've upgraded to fop-0.95.
 
 I've added the following line to the ../fop-0.95/conf/fop.xconf file:
   directoryC:/Program Files/fop-0.95/fonts_lea//directory
 (Maybe this is not the right file to update... ?)
 
 
 Here is the whole configuration file (fop.xconf) as it is now:
 
snip/

Config file looks good without having actually using it.

 The C:/Program Files/fop-0.95/fonts_lea/ directory contains the TTF file
 verdana.ttf
 which I copied from C:/WINDOWS/Fonts.
 
 (Tell me if I am wrong:)
 if your TTF file's name is fontname.ttf then the font name you have to use 
 in the xsl-fo file is fontname (for example: fo:block
 font-family=fontname)
 to get it work.

No, the font-family is not derived from the filename. The font itself
contains the font family name that is to be used. In the case of
verdana.ttf that would be Verdana (case-sensitive!).

 Once having done that, I launched the following command:
 # fop -c C:\Program Files\fop-0.95\conf\fop.xconf -xml projectteam.xml \
   -xsl projectteam2fo.xsl -pdf projectteam.pdf
 and it worked.
 But I had to put the -c option above...

Yes, sure, otherwise you only have a default font configuration, not
your custom one.

 See you.
 -- 
 View this message in context: 
 http://www.nabble.com/FOP---FONTS---expl.-verdana-tp18836748p18849018.html
 Sent from the FOP - Users mailing list archive at Nabble.com.



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Embedding Fonts

2008-08-06 Thread John T



Jeremias Maerki-2 wrote:
 
 But then, what does
 it only works the second time mean? Are there error messages the first
 time? If yes, which? Have you tried with different browsers?  Please make
 sure you've read the tips on this
 page:http://xmlgraphics.apache.org/fop/0.95/servlets.html
 

Sorry for not being clear in my first post. What I mean to say is that the
very first time it is called, the fonts I have embedded (CenturySchoolbook
and Arial) do not show up in the generated PDF. Instead, the default font
shows up. However, the second time I call the servlet, the correct font does
show up. These error messages are being generated:

WARNING: Font 'CenturySchoolbook,normal,400' not found. Substituting with
'any,normal,400'.
Aug 5, 2008 4:55:30 PM org.apache.fop.fonts.FontInfo notifyFontReplacement
WARNING: Font 'CenturySchoolbook,normal,700' not found. Substituting with
'any,normal,700'.
Aug 6, 2008 9:09:31 AM org.apache.fop.fonts.FontInfo notifyFontReplacement
WARNING: Font 'Arial,normal,400' not found. Substituting with
'any,normal,400'.

I have tried with Firefox and IE - the behaviour is the same. The only
solution I have found is to call the code (in the servlet) that generates
the PDF twice; the first time using 
org.apache.commons.io.output.NullOutputStream()  and the second time sending
the output to the browser. While this solution works, I'd like to figure out
why this behaviour is occuring.

Thanks,
John



On 05.08.2008 19:52:15 John T wrote:
 
 Hello. I am embedding fonts in my PDF and it seems to be working. However,
 it
 only works the second  time I call my servlet and subsequet times. Has
 anyone seen this behaviour before or know the cause of such a behaviour?
 The
 servlet is runing on BEA Weblogic v8.1 on a Windows XP desktop. FOP
 version
 is 0.94
 
 Thanks
 John

-- 
View this message in context: 
http://www.nabble.com/Embedding-Fonts-tp18836519p18851689.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FOP - FONTS - expl. verdana

2008-08-06 Thread Jeremias Maerki
On 06.08.2008 15:06:18 lmhelp wrote:
snip/
  No, the font-family is not derived from the filename. The font itself
  contains the font family name that is to be used. In the case of
  verdana.ttf that would be Verdana (case-sensitive!). 
 
 Do you mean that one have to look at the TTF file itself to know which 
 name to use?

Yes, or you can just look under what name the font is available if you
install it in your operating system. On Windows, you can double-click a
TrueType font to see its name. Hopefully, we've improved FOP enough by
now that those names are the same as are identified by FOP (wasn't an
easy thing to do).

snip/


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Embedding Fonts

2008-08-06 Thread Jeremias Maerki
Sounds as if the configuration isn't set soon enough. Please make sure
you instantiate the FopFactory at servlet startup and that you also set
the configuration on the FopFactory at this time. Then, each time the
servlet is called, just create a new Fop instance using that factory.
Without seeing your servlet code it's difficult to pinpoint. The above
is just wild guessing.

At any rate, it should not be necessary to run FOP twice just to get the
fonts embedded. That would be very bad.

On 06.08.2008 15:52:20 John T wrote:
 
 
 
 Jeremias Maerki-2 wrote:
  
  But then, what does
  it only works the second time mean? Are there error messages the first
  time? If yes, which? Have you tried with different browsers?  Please make
  sure you've read the tips on this
  page:http://xmlgraphics.apache.org/fop/0.95/servlets.html
  
 
 Sorry for not being clear in my first post. What I mean to say is that the
 very first time it is called, the fonts I have embedded (CenturySchoolbook
 and Arial) do not show up in the generated PDF. Instead, the default font
 shows up. However, the second time I call the servlet, the correct font does
 show up. These error messages are being generated:
 
 WARNING: Font 'CenturySchoolbook,normal,400' not found. Substituting with
 'any,normal,400'.
 Aug 5, 2008 4:55:30 PM org.apache.fop.fonts.FontInfo notifyFontReplacement
 WARNING: Font 'CenturySchoolbook,normal,700' not found. Substituting with
 'any,normal,700'.
 Aug 6, 2008 9:09:31 AM org.apache.fop.fonts.FontInfo notifyFontReplacement
 WARNING: Font 'Arial,normal,400' not found. Substituting with
 'any,normal,400'.
 
 I have tried with Firefox and IE - the behaviour is the same. The only
 solution I have found is to call the code (in the servlet) that generates
 the PDF twice; the first time using 
 org.apache.commons.io.output.NullOutputStream()  and the second time sending
 the output to the browser. While this solution works, I'd like to figure out
 why this behaviour is occuring.
 
 Thanks,
 John
 
 
 
 On 05.08.2008 19:52:15 John T wrote:
  
  Hello. I am embedding fonts in my PDF and it seems to be working. However,
  it
  only works the second  time I call my servlet and subsequet times. Has
  anyone seen this behaviour before or know the cause of such a behaviour?
  The
  servlet is runing on BEA Weblogic v8.1 on a Windows XP desktop. FOP
  version
  is 0.94
  
  Thanks
  John
 
 -- 
 View this message in context: 
 http://www.nabble.com/Embedding-Fonts-tp18836519p18851689.html
 Sent from the FOP - Users mailing list archive at Nabble.com.
 


Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FOP - FONTS - expl. verdana

2008-08-06 Thread lmhelp

Ok, thank you very much!
What is that snip\ tag I can see in your post?

-- 
View this message in context: 
http://www.nabble.com/FOP---FONTS---expl.-verdana-tp18836748p18855182.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FOP - FONTS - expl. verdana

2008-08-06 Thread Andreas Delmelle

On Aug 6, 2008, at 18:42, lmhelp wrote:



Ok, thank you very much!
What is that snip\ tag I can see in your post?


This simply refers to a part of the original post (which you will  
also see abbreviated to 'OP' at times), which has been 'snipped' (=  
cut) to save the recipient the trouble of scrolling through a lot of  
lines that are not relevant to the reply (some may add a clarifying  
attribute, like snip what=I don't really remember... /)


Cheers

Andreas

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FOP - FONTS - expl. verdana

2008-08-06 Thread lmhelp

Nice explanation, thanks.
-- 
View this message in context: 
http://www.nabble.com/FOP---FONTS---expl.-verdana-tp18836748p18856226.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Embedding Fonts

2008-08-06 Thread John T

This was the issue. I am now instantiating the FopFactory in the init()
method of the servlet as well as setting the configuration there as well. Is
this considered best practices for using Fop in a servlet?


Jeremias Maerki-2 wrote:
 
 Sounds as if the configuration isn't set soon enough. Please make sure
 you instantiate the FopFactory at servlet startup and that you also set
 the configuration on the FopFactory at this time. Then, each time the
 servlet is called, just create a new Fop instance using that factory.
 Without seeing your servlet code it's difficult to pinpoint. The above
 is just wild guessing.
 
 At any rate, it should not be necessary to run FOP twice just to get the
 fonts embedded. That would be very bad.
 
 On 06.08.2008 15:52:20 John T wrote:
 
 
 
 Jeremias Maerki-2 wrote:
  
  But then, what does
  it only works the second time mean? Are there error messages the
 first
  time? If yes, which? Have you tried with different browsers?  Please
 make
  sure you've read the tips on this
  page:http://xmlgraphics.apache.org/fop/0.95/servlets.html
  
 
 Sorry for not being clear in my first post. What I mean to say is that
 the
 very first time it is called, the fonts I have embedded
 (CenturySchoolbook
 and Arial) do not show up in the generated PDF. Instead, the default font
 shows up. However, the second time I call the servlet, the correct font
 does
 show up. These error messages are being generated:
 
 WARNING: Font 'CenturySchoolbook,normal,400' not found. Substituting with
 'any,normal,400'.
 Aug 5, 2008 4:55:30 PM org.apache.fop.fonts.FontInfo
 notifyFontReplacement
 WARNING: Font 'CenturySchoolbook,normal,700' not found. Substituting with
 'any,normal,700'.
 Aug 6, 2008 9:09:31 AM org.apache.fop.fonts.FontInfo
 notifyFontReplacement
 WARNING: Font 'Arial,normal,400' not found. Substituting with
 'any,normal,400'.
 
 I have tried with Firefox and IE - the behaviour is the same. The only
 solution I have found is to call the code (in the servlet) that generates
 the PDF twice; the first time using 
 org.apache.commons.io.output.NullOutputStream()  and the second time
 sending
 the output to the browser. While this solution works, I'd like to figure
 out
 why this behaviour is occuring.
 
 Thanks,
 John
 
 
 
 On 05.08.2008 19:52:15 John T wrote:
  
  Hello. I am embedding fonts in my PDF and it seems to be working.
 However,
  it
  only works the second  time I call my servlet and subsequet times. Has
  anyone seen this behaviour before or know the cause of such a
 behaviour?
  The
  servlet is runing on BEA Weblogic v8.1 on a Windows XP desktop. FOP
  version
  is 0.94
  
  Thanks
  John
 
 -- 
 View this message in context:
 http://www.nabble.com/Embedding-Fonts-tp18836519p18851689.html
 Sent from the FOP - Users mailing list archive at Nabble.com.
 
 
 
 Jeremias Maerki
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Embedding-Fonts-tp18836519p18856555.html
Sent from the FOP - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Using TTFReader to Create Font Metrics

2008-08-06 Thread Steffanina, Jeff

I installed fop-0.94 binaries and the
org.apache.fop.fonts.apps.TTFReader  binary is apparently not included.

I installed the fop-0.94 SOURCE and I now have the entire set of source
file including:  TTFReader.java.

How do I go about compiling the source library so that I can create the
font metrics file (.xml)?  I plan to use the command as specified in the
docs:

java -cp
build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commo
ns-io.jar
org.apache.fop.fonts.apps.TTFReader  myfont.ttf
newfont.xml


Thanks.

Jeff 



Re: Embedding Fonts

2008-08-06 Thread Jeremias Maerki
Yes. You might also want to look at our demo servlet:
https://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/servlet/FopServlet.java?view=markup

On 06.08.2008 20:03:46 John T wrote:
 
 This was the issue. I am now instantiating the FopFactory in the init()
 method of the servlet as well as setting the configuration there as well. Is
 this considered best practices for using Fop in a servlet?
 
 
 Jeremias Maerki-2 wrote:
  
  Sounds as if the configuration isn't set soon enough. Please make sure
  you instantiate the FopFactory at servlet startup and that you also set
  the configuration on the FopFactory at this time. Then, each time the
  servlet is called, just create a new Fop instance using that factory.
  Without seeing your servlet code it's difficult to pinpoint. The above
  is just wild guessing.
  
  At any rate, it should not be necessary to run FOP twice just to get the
  fonts embedded. That would be very bad.
  
  On 06.08.2008 15:52:20 John T wrote:
  
  
  
  Jeremias Maerki-2 wrote:
   
   But then, what does
   it only works the second time mean? Are there error messages the
  first
   time? If yes, which? Have you tried with different browsers?  Please
  make
   sure you've read the tips on this
   page:http://xmlgraphics.apache.org/fop/0.95/servlets.html
   
  
  Sorry for not being clear in my first post. What I mean to say is that
  the
  very first time it is called, the fonts I have embedded
  (CenturySchoolbook
  and Arial) do not show up in the generated PDF. Instead, the default font
  shows up. However, the second time I call the servlet, the correct font
  does
  show up. These error messages are being generated:
  
  WARNING: Font 'CenturySchoolbook,normal,400' not found. Substituting with
  'any,normal,400'.
  Aug 5, 2008 4:55:30 PM org.apache.fop.fonts.FontInfo
  notifyFontReplacement
  WARNING: Font 'CenturySchoolbook,normal,700' not found. Substituting with
  'any,normal,700'.
  Aug 6, 2008 9:09:31 AM org.apache.fop.fonts.FontInfo
  notifyFontReplacement
  WARNING: Font 'Arial,normal,400' not found. Substituting with
  'any,normal,400'.
  
  I have tried with Firefox and IE - the behaviour is the same. The only
  solution I have found is to call the code (in the servlet) that generates
  the PDF twice; the first time using 
  org.apache.commons.io.output.NullOutputStream()  and the second time
  sending
  the output to the browser. While this solution works, I'd like to figure
  out
  why this behaviour is occuring.
  
  Thanks,
  John
  
  
  
  On 05.08.2008 19:52:15 John T wrote:
   
   Hello. I am embedding fonts in my PDF and it seems to be working.
  However,
   it
   only works the second  time I call my servlet and subsequet times. Has
   anyone seen this behaviour before or know the cause of such a
  behaviour?
   The
   servlet is runing on BEA Weblogic v8.1 on a Windows XP desktop. FOP
   version
   is 0.94
   
   Thanks
   John
  
  -- 
  View this message in context:
  http://www.nabble.com/Embedding-Fonts-tp18836519p18851689.html
  Sent from the FOP - Users mailing list archive at Nabble.com.
  
  
  
  Jeremias Maerki
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
 
 -- 
 View this message in context: 
 http://www.nabble.com/Embedding-Fonts-tp18836519p18856555.html
 Sent from the FOP - Users mailing list archive at Nabble.com.
 
 



Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Using TTFReader to Create Font Metrics

2008-08-06 Thread Jeremias Maerki
On 06.08.2008 20:33:32 Steffanina, Jeff wrote:
 
 I installed fop-0.94 binaries and the
 org.apache.fop.fonts.apps.TTFReader  binary is apparently not included.

Yes, it is. It's in fop.jar.

 I installed the fop-0.94 SOURCE and I now have the entire set of source
 file including:  TTFReader.java.
 
 How do I go about compiling the source library so that I can create the
 font metrics file (.xml)?  I plan to use the command as specified in the
 docs:
   
   java -cp
 build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commo
 ns-io.jar
   org.apache.fop.fonts.apps.TTFReader  myfont.ttf
 newfont.xml

Please do yourself a favor, download the new FOP 0.95 and you can forget
about font metrics files since 0.95 can work without them. 0.94 can also
do that but there have been some important improvements in that area. See
here for more information:
http://xmlgraphics.apache.org/fop/0.95/fonts.html#basics

Good luck!

Jeremias Maerki


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FOP - FONTS - expl. verdana

2008-08-06 Thread J.Pietschmann

lmhelp wrote:

That's a very --original way to specify a pathname containing a space.
I don't think I've ever seen that before. Does Windows even accept it?

I do not know if you are joking or not but Windows unfortunately does.


That's a common confusion: Most Windows programs interpret quotes
in command lines, config files, registry keys and similar places
where whitespace may be significant as a parameter separator. This
is similar to the interpretation of quotes by the Unix shell.
This doesn't make the quotes part of the pathname, nor does it
indicate that the mechanism can be universally applied.

J.Pietschmann

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]