我正在使用itext創建PDF文檔。由於許可限制,某些字體無法使用。如何檢查字體是否可嵌入
...
ExceptionConverter: com.lowagie.text.DocumentException: C:\WINDOWS\Fonts\LucidaSansRegular.ttf cannot be embedded due to licensing restrictions.
at com.lowagie.text.pdf.TrueTypeFontUnicode.<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.lowagie.text.pdf.DefaultFontMapper.awtToPdf(Unknown Source)
at com.lowagie.text.pdf.PdfGraphics2D.getCachedBaseFont(Unknown Source)
at com.lowagie.text.pdf.PdfGraphics2D.setFont(Unknown Source)
...
我想檢查字體或PDF內容來檢查這種情況。如何檢查一個字體是否可以使用java或itext嵌入?
使用,你可以如'try {embed ...} catch(not embeddable){}' – Erik 2011-04-15 11:38:00