  | 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
|
|
|
  | | | Usage of BaseFont | Usage of BaseFont 2006-08-10 - By Martin Spek
Back 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> </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> </DIV> <DIV><FONT face=Arial size=2>To define the font to be used, we use the BaseFont class:</FONT></DIV> <DIV> </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> </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> </DIV> <DIV><FONT face=Arial><FONT size=2>For some fonts there are differ<SPAN class=613191908-10082006>e</SPAN>nt files for italic <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 <SPAN class=613191908-10082006>all the styles of a font.</SPAN></FONT></FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>My question is:<BR>How can I, be means of the BaseFont class, <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> </DIV> <DIV><FONT face=Arial size=2>Thank you</FONT></DIV> <DIV> </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
|
|
 |