当我使用以下方法添加注释时:
PdfAnnotation.createFileAttachment(writer,null,null , null, , "שם קובץ", "שם קובץ");
注释中的希伯来字母未显示。
有没有办法解决它?
\u00a0,不间断空格的值)。如果您不这样做,编译器可能会错误地解释字符(请参阅给出的注释)。PdfFileSpecification对象的方法,并使用诸如setUnicodeFileName()将 unicode 参数设置为true. 这样,iText 就知道字符应该被解释为 Unicode 字符。null作为Rectangle. 那没有意义。您确定要添加文件附件注释吗?根据您的代码,我假设您想要添加文档级附件。这样做是这样的:writer.addFileAttachment(fs);使用类fs的实例FileSpecification。