Java PDFBox-更改附件字体

发布于 2025-02-12 22:48:27 字数 536 浏览 0 评论 0原文

我有一项将文件附加到PDF的服务,并且需要支持用泰语字母中的名称附加文件。但是,这样做时,我在附件文件中得到一个奇怪的名称:

”在此处输入图像描述

这是使用fs.setFileunicode()。使用fs.setFile()生成一个更陌生的名称:

”在此处输入图像描述”

保留泰国文件名?

I have a service that attaches files to pdf, and a requirement to support attaching files with name in Thai alphabet. However, I get a strange name in the attached file when doing so:

enter image description here

this is done using fs.setFileUnicode(). using fs.setFile() generates an even stranger name:

enter image description here

How can I preserve the Thai file name?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

情仇皆在手 2025-02-19 22:48:27

通过使用fs.setFile()fs.setfileunicode(),加上fs.setembeddedfile()来解决。

Solved by using both fs.setFile() and fs.setFileUnicode(), plus fs.setEmbeddedFile()

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文