PDA

View Full Version : Problem with embeding font to BIRT pdfs



macbeeth
06-22-2006, 09:25 AM
I have problem with polish charters in my pdf BIRT reports.
I'm runing Pentaho on Linux.

My FopEmitter is configurated:

1) JMV option:
-DFOP_CONFIG_FILE=<path to your FOP config file>

2) fop.xml
<fonts>
<font metrics-file="<url to font matrix>" embed-file="<url to the .ttf file>" kerning="yes">
<font-triplet name="Arial" style="normal" weight="normal"/>
<font-triplet name="ArialMT" style="normal" weight="bold"/>
</font>

Where url are: "file:///usr/local/fonts/..."

3) I generated font matrix files this TTFReader include in fop.jar

I tried to check if my file is read and corred it. I get short (one line) log
when file fop.xml wasn't well-formed. I get no log when file fop.xml was well-formed but not valid with fop.jar/conf/config.dtd. ViewAction in both cases finished "succesfully" I get pdf report with out polish charters.

(I analized content of pdf file. In proper pdf file I see lines:
<< /Type /FontDescriptor
/FontName /CAAAAA+TimesNewRomanPSMT
/Flags 6
/FontBBox [ -568 -306 2028 1007 ]
/ItalicAngle 0
/Ascent 891
/Descent 216
/CapHeight 1006
/StemV 80
/FontFile2 17 0 R
>>



<< /Type /Font
/Subtype /TrueType
/BaseFont /CAAAAA+TimesNewRomanPSMT
/FirstChar 0
/LastChar 30
/Widths [ 777 443 250 500 500 277 443 277
500 443 443 333 722 500 500 389
500 500 443 277 556 722 556 943
500 500 777 277 333 500 500 ]
/FontDescriptor 19 0 R
/ToUnicode 20 0 R
>>

in my BIRT output I have only default Adobe fonts

<< /Type /Font
/Subtype /Type1
/Name /F7
/BaseFont /Times-Bold
/Encoding /WinAnsiEncoding >>

)
I attach simle pdf output with the problem.

It looks like file fop.xml was parsed but ignored???? or ?

I really don't have any idea what could be wrong? I need help! http://forums.pentaho.org/archived_att/files/ViewAction.pdf

mbatchelor
06-22-2006, 12:36 PM
BIRT 2.0.1 has eliminated the need for FOP. Our latest code line (available in SVN) has support for BIRT 2.0.1.

I suggest trying that, or switch to JFreeReport (which our Report Design Wizard and Report Designer utilize) - JFreeReport has a simple way to specify embedding the fonts within the PDF.

Take care,

Marc