Hi all

Thanks for the help with embedding fonts. I finally got it working using the
latest CVS version. As for the error I mentioned below, it seems that
currentFObj variable in the FOTreeBuilder class is either not being set or
is being set to null while processing and this was causing the error. Has
anyone else experienced this problem. I dont know the FOP code well enough
to track it down so I wrapped an if around the code  and this got around the
problem. Although I am not sure what is NOT being processed.

Another issue I noticed is that when using Arial Bold font in my PDF, it
looks okay when viewing the pdf but some of the letters come out scrambled
when printing! Has anyone seen this/heard of this before? I have attached
the pdf for you to see.

Ricardo



-----Original Message-----
From: Ricardo Coutinho [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 14:04 PM
To: [EMAIL PROTECTED]
Subject: RE: Help please with Fonts and FOP : FW: Adding additional
fonts to FOP 0.17.0



I tried to run the fop process using the latest CVS version, however i get
the following error now

D:\TEMP\FOP>fop -c D:\TEMP\FOP\build\classes\conf\userconfig.xml -xml
d:\dev\xml\myfile3.xml -xsl d:\dev\xml\miragepdf_.xsl -pdf out.pdf

D:\TEMP\FOP>java -cp
fop.jar;lib\batik.jar;lib\xalan-2.0.0.jar;lib\xerces-1.2.3.jar;lib\jimi-1.0.
jar org.apache.fop.apps.Fop -c D:\TEMP\FOP\build\clas
ses\conf\userconfig.xml -xml d:\dev\xml\myfile3.xml -xsl
d:\dev\xml\miragepdf_.xsl -pdf out.pdf
reading user configuration file
FOP 0.19.0-CVS
using SAX parser org.apache.xerces.parsers.SAXParser
building formatting object tree
javax.xml.transform.TransformerException
        at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
ava:1212)
        at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:2894)
        at java.lang.Thread.run(Thread.java:484)
---------
java.lang.NullPointerException
        at
org.apache.fop.fo.FOTreeBuilder.characters(FOTreeBuilder.java:167)
        at
org.apache.xalan.transformer.ResultTreeHandler.characters(ResultTreeHandler.
java:446)
        at
org.apache.xalan.stree.TextImpl.dispatchCharactersEvent(TextImpl.java:157)
        at
org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.ja
va:449)
        at
org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.jav
a:193)
        at
org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.ja
va:495)
        at
org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.jav
a:193)
        at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2154)
        at
org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(Transform
erImpl.java:2097)
        at
org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(Transformer
Impl.java:2029)
        at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
ava:1189)
        at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:2894)
        at java.lang.Thread.run(Thread.java:484)
ERROR: null

Any ideas?

The same Xml/xsl works with FOP 0.17.0

Ricardo



-----Original Message-----
From: Petr Andrs [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 12:46 PM
To: [EMAIL PROTECTED]
Subject: Re: Help please with Fonts and FOP : FW: Adding additional
fonts to FOP 0.17.0


I have some experience with embedding TTF to be able use special
characters used across central an eastern Europe which are not covered
by WinAnsiEncoding. I recommend you to use recent CVS version since
there were some bugs concerning TTFs which were fixed two weeks ago.
Some more comments are written directly into your message.

On 22 Jun 2001, at 11:47 Ricardo Coutinho wrote about Help please with Fonts
and FOP : FW :

> Hi
>
> I posted this message a couple of days back regarding adding additional
> fonts to FOP. Unfortunately I did not get much response to my problem.
> Can someone please give me a few pointers on how to get wround my
> problem.
>
> Thanks in advance....
>
> Ricardo Coutinho
>
> -----Original Message-----
> From: Ricardo Coutinho [mailto:[EMAIL PROTECTED]]
>
> Hi all
>
> I am trying to use additional fonts as part in my PDF creation process.
> However I am getting a number of errors/funnies which is making my life
> difficult.
>
> 1. I get the error below when trying to generate the font metrics file
> for the Arial font. TTF Reader v1.0
>
> Reading D:\winnt\fonts\arial.ttf...
>
> Read dir tab [68 83 73 71] offset: 146136 length: 5096 name: DSIG
> Read dir tab [76 84 83 72] offset: 6752 length: 659 name: LTSH
> Read dir tab [79 83 47 50] offset: 456 length: 86 name: OS/2
> Read dir tab [80 67 76 84] offset: 146080 length: 54 name: PCLT
> Read dir tab [86 68 77 88] offset: 7412 length: 4500 name: VDMX
> Read dir tab [99 109 97 112] offset: 3704 length: 1734 name: cmap
> Read dir tab [99 118 116 32] offset: 15432 length: 1416 name: cvt
> Read dir tab [102 112 103 109] offset: 13976 length: 1456 name: fpgm
> Read dir tab [103 97 115 112] offset: 544 length: 16 name: gasp Read dir
> tab [103 108 121 102] offset: 35316 length: 100434 name: glyf Read dir
> tab [104 100 109 120] offset: 19468 length: 15848 name: hdmx Read dir
> tab [104 101 97 100] offset: 332 length: 54 name: head Read dir tab [104
> 104 101 97] offset: 388 length: 36 name: hhea Read dir tab [104 109 116
> 120] offset: 16848 length: 2620 name: hmtx Read dir tab [107 101 114
> 110] offset: 140608 length: 5472 name: kern Read dir tab [108 111 99 97]
> offset: 5440 length: 1312 name: loca Read dir tab [109 97 120 112]
> offset: 424 length: 32 name: maxp Read dir tab [110 97 109 101] offset:
> 560 length: 3143 name: name Read dir tab [112 111 115 116] offset:
> 135752 length: 4856 name: post Read dir tab [112 114 101 112] offset:
> 11912 length: 2063 name: prep java.io.EOFException: Reached EOF, file
> size=151232
>         at
> org.apache.fop.fonts.FontFileReader.readTTFString(FontFileReader.java:22
> 0)
>         at org.apache.fop.fonts.TTFFile.readFont(TTFFile.java:221)
>         at
>         org.apache.fop.fonts.apps.TTFReader.loadTTF(TTFReader.java:207)
>         at org.apache.fop.fonts.apps.TTFReader.main(TTFReader.java:176)
>
>                    -----------------------------------------------------
>                    ----
> ------------------------

As I stated, there were some bugs time ago, also in TTF reader, so use
recent CVS version of FOP. If some problem persists, downloading
freshest fonts from www.microsoft.com/typography can't hurt. I am using
TTFReader with option "-enc cid" and this works perfectly for me, I
have no experience with the other encoding methods since they are
useless for me.

>
>
> 2 I managed to generate the metrics file using the latest Fop-0.19.0-CVS
> version (I downloaded today) and tha worked. However the generate
> process seemed to skip out certain nodes that the version 1.0 TTF reader
> creates ie <class-name>, <first-char>, <last-char>. Without those
> entries I was not able to rebuild FOP TTF Reader v1.1.1
>
> Reading D:\winnt\fonts\arial.ttf...
>
> Number of glyphs in font: 655
> Creating xml font file...
>
> Creating CID encoded metrics
> Writing xml font file Arial.xml...
>
> This font contains no embedding license restrictions
>                    -----------------------------------------------------
>                    ----
> ------------------------
>
> 3 I did finaly manage to rebuild FOP with the Arial font built in.
> However, the resulting PDF was all messed up. I have attached snippets
> of the 2 outputs. Did this happen because the font-metrics file is
> missing entries...?

Again, use latest CVS version, now font embeding is done without need
for rebuild. Specify your fonts in userconfig.xml. I managed to do this
with documentation so you can do it as well. And last advice, try to
use Unicoded FO files (UTF-8,UTF-16). These works perfectly and
according to XML specification UTF-8 and UTF-16 are only encodings that
are required to be supported. I haven't tested any other encoding and
there may be problems (now I recall that I had problem with ISO-8859-2
so I switched to UTF-8)

> Thanks in advance for you help.

I hope this helps

>
> Ricardo Coutinho
> Developer

pa

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


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

out.pdf

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

Reply via email to