Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
JSP - A mailing list about Java Server Pages specification and reference
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
Usage of BaseFont

Usage of BaseFont

2006-08-10       - By Martin Spek

 Back
Reply:     1     2     3  

Hello

We are using iText's Direct Content facility.

To define the font to be used, we use the BaseFont class:

BaseFont bf = BaseFont.createFont(font, BaseFont.CP1252,
BaseFont.EMBEDDED);
cb.beginText();
cb.setFontAndSize(bf, 12);

The variable font is a String containing the fysical name of the
ttf-file containing the font, i.e "C:\winnt\fonts\BELLEVUE.ttf'.

For some fonts there are different files for italic or bold. For some
other fonts there is just one file.
From our Windows system manager I understood that ttf-files can hold all
the styles of a font.

My question is:
How can I, be means of the BaseFont class, indicate that I want to use
the italic style of a font with just one ttf-file?

Thank you

Martin
e-mail: martin.spek@(protected)

--

Dit e-mailbericht en eventuele bijlage is uitsluitend bestemd voor de
geadresseerde(n) en strikt vertrouwelijk of anderszins wettelijk beschermd. In
dit bericht vervatte opvattingen of meningen zijn uitsluitend die van de
schrijver en niet per definitie die van P.C. Hooft Groep BV of aan haar
gelieerde dochterondernemingen. Er kunnen aan dit bericht geen rechten worden
ontleend.

Indien u niet de geadresseerde bent, verzoeken wij u dit bericht en eventuele
bijlage daarbij aan de afzender terug te sturen en alle kopien ervan te
vernietigen.

De P.C. Hooft Groep BV scant de uitgaande berichten op virussen, maar kan niet
aansprakelijk worden gesteld in geval dit e-mailbericht en/of enige bijlage wel
een virus bevat. De P.C. Hooft Groep BV kan op geen enkele wijze
verantwoordelijk of aansprakelijk worden gehouden voor en/of in verband met de
gevolgen van en/of schade ontstaan door het onjuist, onvolledig en/of niet
-tijdig versturen en ontvangen van de inhoud van dit bericht.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1505" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2>Hello</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>We are using iText's Direct Content fa<SPAN
class=613191908-10082006>c</SPAN>ility.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>To define the font to be used, we use the BaseFont
class:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>BaseFont bf = BaseFont.createFont(font,
BaseFont.CP1252, BaseFont.EMBEDDED);
<BR>cb.beginText();<BR>cb.setFontAndSize(bf, 12);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>The variable <STRONG>font</STRONG> is a String
containing the fysical name of the ttf-file containing the font, i.e
"C:\winnt\fonts\BELLEVUE.ttf'.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial><FONT size=2>For some fonts there are differ<SPAN
class=613191908-10082006>e</SPAN>nt files for italic&nbsp;<SPAN
class=613191908-10082006>or</SPAN> bold. For some other fonts there is just one
file.<BR>From our Windows system manager I understood that ttf-files can
hold&nbsp;<SPAN class=613191908-10082006>all the styles of a
font.</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>My question is:<BR>How can I, be means of the
BaseFont class,&nbsp;<SPAN class=613191908-10082006>indicate </SPAN>that I want
to use the italic style of a font with just one ttf-file?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Thank you</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Martin<BR>e-mail: <A
href="mailto:martin.spek@(protected)">martin.spek@(protected)</A><BR></FONT></DIV></BODY><
/HTML><pre>--

Dit e-mailbericht en eventuele bijlage is uitsluitend bestemd voor de
geadresseerde(n) en strikt vertrouwelijk of anderszins wettelijk beschermd. In
dit bericht vervatte opvattingen of meningen zijn uitsluitend die van de
schrijver en niet per definitie die van P.C. Hooft Groep BV of aan haar
gelieerde dochterondernemingen. Er kunnen aan dit bericht geen rechten worden
ontleend.

Indien u niet de geadresseerde bent, verzoeken wij u dit bericht en eventuele
bijlage daarbij aan de afzender terug te sturen en alle kopien ervan te
vernietigen.

De P.C. Hooft Groep BV scant de uitgaande berichten op virussen, maar kan niet
aansprakelijk worden gesteld in geval dit e-mailbericht en/of enige bijlage wel
een virus bevat. De P.C. Hooft Groep BV kan op geen enkele wijze
verantwoordelijk of aansprakelijk worden gehouden voor en/of in verband met de
gevolgen van en/of schade ontstaan door het onjuist, onvolledig en/of niet
-tijdig versturen en ontvangen van de inhoud van dit bericht.</pre>
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -----
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@(protected)
https://lists.sourceforge.net/lists/listinfo/itext-questions

©2008 junlu.com - Jax Systems, LLC, U.S.A.