Op 25/02/2011 19:30, Craig Hodder schreef: > Greetings to all. > > I am wondering how I might add to the font lists used by the BaseFont element > in the code; I have a custom font that I would like to use to add text to a > PDF with. In a previous code snippet, you posted:
BaseFont.CreateFont(BaseFont.TIMES_ROMAN, "Cp1252", False) If you want another font, you can replace BaseFont.TIMES_ROMAN with the path to a font file. If you're working on Windows, you could try "c:/windows/fonts/arial.ttf". Note that it's always wise to embed custom fonts (final parameter = True) because the custom font may not be present on the OS of the consumer of your PDF files. Go to http://kuujinbo.info/iTextInAction2Ed/index.aspx and take a look at the examples in chapter 11. For instance: http://kuujinbo.info/iTextInAction2Ed/index.aspx?ch_key=Chapter11&cl_key=FontTypes ------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
