Greetings Nilardi,
I created a properties file with an entry such as:
wealthReportWeb.plugins.dir=${wealthReportWeb.webContent.dir}/WEB-INF/pl
atform/plugins
wealthReportWeb.fonts.dir=${wealthReportWeb.plugins.dir}/org.eclipse.bir
t.report.engine.fonts_2.2.1.v20070823/fonts/
Inside my build.xml Ant script, I then have the following:
<target name="createBirtConfigProperties">
<propertyfile
file="${wealthReportWeb.gensrc.dir}/BirtConfig.properties">
<entry key="verdana" value="${wealthReportWeb.fonts.dir}/verdana.ttf" />
</propertyfile>
</target>
Then inside my code I do the following:
BaseFont bf = BaseFont.createFont(configProps.getString("verdana"),
BaseFont.WINANSI, BaseFont.NOT_EMBEDDED);
HTH!
Schalk Neethling
________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Niladri Bhattacharyya
Sent: 03 January 2008 12:47 PM
To: [email protected]
Subject: [iText-questions] Problem with Font creation.
Hi
I am unable to create the Font inside my servlet and my page events
class. How to get the actual path of the Font file , can somebody help
me ?
the code written is :
BaseFont bf = BaseFont.createFont(fontPathName, BaseFont.IDENTITY_H,
BaseFont.EMBEDDED);
Now this font path name must be the actual path of the file in the
system. The file is put inside webapp folder, hence inside the .war
file. This is required inside my page events class also.
Please help me if possible.
Thanks
Niladri.
________________________________
Save all your chat conversations. Find them online.
<http://in.rd.yahoo.com/tagline_webmessenger_3/*http:/in.messenger.yahoo
.com/webmessengerpromo.php>
This email and all content are subject to the following disclaimer:
http://content.momentum.co.za/content/legal/disclaimer_email.htm
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/