PDFBOX:U + 000A('controlLF')不适用于此字体Helvetica编码:WinAnsiEncoding [英] PDFBOX : U+000A ('controlLF') is not available in this font Helvetica encoding: WinAnsiEncoding
本文介绍了PDFBOX:U + 000A('controlLF')不适用于此字体Helvetica编码:WinAnsiEncoding的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当尝试使用Java和 org.apache.pdfbox
库打印PDF页面时,出现此错误:
When trying to print a PDF page using Java and the org.apache.pdfbox
library, I get this error:
PDFBOX:U + 000A('controlLF')不能使用此字体Helvetica编码:WinAnsiEncoding
PDFBOX : U+000A ('controlLF') is not available in this font Helvetica encoding: WinAnsiEncoding
推荐答案
[问题]您尝试显示的字符串包含换行符.
[PROBLEM] The String you are trying to display contains a newline character.
[解决方案]用新字符串替换字符串并删除换行符:
[SOLUTION] Replace the String with a new one and remove the newline:
text = text.replace("\n", "").replace("\r", "");
这篇关于PDFBOX:U + 000A('controlLF')不适用于此字体Helvetica编码:WinAnsiEncoding的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文