iText PDF中的Unicode字符 [英] Unicode characters in iText PDF

查看:150
本文介绍了iText PDF中的Unicode字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要iText的帮助我看一些谷歌的结果和一些在这里,但没有找到任何适合我的东西。我需要在我的pdf中使用波兰字符,但我什么都没有。如果需要在评论中写下其他内容,我认为这是一个很重要的代码:

I need help with iText I look at some Google result and some here but don't find anything that work for me. I need to use polish character in my pdf but i got nothing for no. Here is a code that I think is important if need something else write in comment:

private static Font bigFont = new Font(Font.FontFamily.HELVETICA, 18, Font.BOLD);

另一个

Paragraph par = new Paragraph(Łabadzak, bigFont);

任何人都可以告诉我如何使Ł以pdf和其他波兰语字符显示

Can any1 tell me what to do to make that Ł visible in pdf and other polish character

更新
我资助此但不知道如何将它用于我的项目
波兰人物in itext PDF

推荐答案

您需要一个unicode字体。下面是一个示例:

You need a unicode font. Here is an example:

BaseFont bf = BaseFont.createFont("arialuni.ttf", BaseFont.IDENTITY_H, BaseFont.EMBEDDED);

Paragraph p = new Paragraph("Şinasi ıssız ile ağaç", new Font(bf, 22));

document.add(p);

http://abdullahakay.blogspot.com/2011/11/java-itext-unicode.html

这篇关于iText PDF中的Unicode字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆