Hi,

i would prefer to include the fonts i want to use inside the war file. This way i do not have to worry about cross-platform issues and giving the app permissions to read the local file system.

I would be grateful for more guidance on how to include the ttf files inside my war? Do i just put them in the classpath (WEB-INF/classes/fonts) and they will automatically picked up?

Thanks

Rakesh

Piotr Górski wrote:

Hi,

IMHO just attach permanently the Arial Font to your application ? Write simple code which will check operating system and then register this font.

For example:

DefaultFontMapper mapper = new DefaultFontMapper();
osname = System.getProperty("os.name");
userdir = System.getProperty("user.dir");

if (osname.equals("Linux"))   {
   mapper.insertDirectory(userdir + "/fonts");
} else if (osname.equals("Windows"))   {
   mapper.insertDirectory(userdir + "\\fonts");
}

It's something like that,

Regards,

Rakesh Patel wrote:

Hi,

I'm new to iText so please forgive my question if its obvious.

I am developing a pdf that needs to use Arial font. I saw previous postings about finding the ttf file and registering it.

However, my app runs on both windows and unix so hard coding a directory path is not easy. Has anyone got a work around? Are ttf files on windows and Solaris the same and interchangeable?

Thanks

Rakesh




-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions




-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to