I tried this solution editing the font:
http://itext-general.2136553.n4.nabble.com/Error-message-td2166291.html

but the copy is not corrupt, the ttf gets corrupted after I run the code
above. I did add some fields with the FPedit, but the problem still


2013/7/10 André Fróes <arfmor...@gmail.com>

> Hello, I`m facing problems when creating a BaseFont with font file outside
> of windows/font folder.
> I followed this example:
>
> http://itextpdf.com/examples/iia.php?id=213
>
> when it is set to c:/windows/fonts/arial.ttf it works just fine. When I
> try to get it from my project resource folder it is not working, it shows
> me this exception:
>
> Exception in thread "main" com.lowagie.text.DocumentException: Table
> 'name' does not exist in
> C:/myproj/26062013/source/proj/target/classes/fonts/arial.ttf
> at com.lowagie.text.pdf.TrueTypeFont.getBaseFont(Unknown Source)
>  at com.lowagie.text.pdf.TrueTypeFont.process(Unknown Source)
> at com.lowagie.text.pdf.TrueTypeFont.<init>(Unknown Source)
>  at com.lowagie.text.pdf.BaseFont.createFont(Unknown Source)
> at com.lowagie.text.pdf.BaseFont.createFont(Unknown Source)
>  at com.lowagie.text.pdf.BaseFont.createFont(Unknown Source)
> at com.nsn.commons.pdf.FontFilesAndSizes.main(FontFilesAndSizes.java:68)
> ------------------------------------------------------------------------
>
> the path is correct, I can access it without any problems, but this
> exception keeps showing. I`m trying the example with wingdings font
> (WINGDNG2.TTF) and arial but no success with any.
>
> public static final String FONT =
> "C:/myproj/26062013/source/proj/target/classes/fonts/arial.ttf";
> ..
> ..
> BaseFont bf;
> bf = BaseFont.createFont(FONT, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED);
> ffs.createPdf(RESULT[0], bf, TEXT);
>
> is further config needed?
>
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
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

Reply via email to