bruno wrote: > Amir wrote: > >> Hi, i'm stuck :) >> >> I've been trying to create a pdf from XML but i'm stuck on trying to >> define the fonts. >> >> The xml looks something like this >> ........ >> <?xml version="1.0" encoding="ISO-8859-1" ?> >> >> <ITEXT> >> <HEADER> >> Header >> </HEADER> >> >> <P> >> Some random text >> </P> >> >> <NEWLINE/> >> >> <P> >> More random text >> </P> >> >> <SIGN/> >> >> </ITEXT> >> ........ >> >> To this i defined a tagmap xml that looks like this >> >> ******** >> <?xml version="1.0" encoding="ISO-8859-1" ?> >> >> <tagmap> >> <tag name="itext" alias="ITEXT" /> >> <tag name="newline" alias="NEWLINE" /> >> <tag name="paragraph" alias="HEADER"> >> <attribute name="size" value="11" /> >> <attribute name="style" value="bold" /> >> <attribute name="font" value="arial" /> >> <attribute name="embedded" value="true" /> >> </tag> >> <tag name="paragraph" alias="P"> >> <attribute name="font" value="times new roman" /> >> <attribute name="size" value="11" /> >> <attribute name="embedded" value="true" /> >> </tag> >> <tag name="paragraph" alias="SIGN" content="Static text"> >> <attribute name="font" value="times new roman" /> >> <attribute name="size" value="11" /> >> <attribute name="embedded" value="true" /> >> </tag> >> </tagmap> >> ******** >> >> In my onOpenDocumen() event i register 2 fonts in a directory with >> FontFactory.registerDirectory() and according to the list of registered >> fonts it's successful. >> >> The problem is that only the static text defined in the SIGN tag gets >> times as font and all other text uses the default font(Helvetica). >> >> What am i doing wrong? >> > Nothing, the problem was already reported by Matteo Conta. > I fixed it on April 20, but for the moment the fix is only available > in the CVS repository and I hear that anonymous CVS at SF > is still down. Therefore I send you the changed class in attachment. > See also: > http://www.mail-archive.com/[email protected]/msg22802.html > > http://article.gmane.org/gmane.comp.java.lib.itext.general/22345 > br, > Bruno > >
Thank you ! That saved my week :) ------------------------------------------------------- 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 [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
