Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Wed Aug 06, 2025 7:21 am

Hello.
When converting Japanese text containing surrogate pairs to PDF, it is displayed as blank spaces.
Is there a way to display it correctly?
Below is a sample code.
* If the text contains surrogate pair characters, an error may occur when posting to the forum, so the corresponding characters are written in Unicode.
★: U+20BB7

Code: Select all
PdfDocument doc = new PdfDocument();
PdfPageBase page = doc.getPages().add();
PdfTrueTypeFont font = new PdfTrueTypeFont(new Font("Yu Mincho", Font.BOLD, 18));
page.getCanvas().drawString("★田 髙茂", font, PdfBrushes.getBlack(), 0, 0);
doc.saveToFile("output.pdf");
doc.close();

matsufuji
 
Posts: 12
Joined: Tue Aug 06, 2024 4:57 am

Wed Aug 06, 2025 10:25 am

Hello,

Are you trying to achieve the effect shown in the attached screenshot? If not, to help us investigate further, please provide us with more details about your issue, some screenshots or your expected output document would be helpful. Thanks in advance.
Sincerely,
Talia
E-iceblue support team
User avatar

talia.liu
 
Posts: 331
Joined: Mon Apr 14, 2025 3:33 am

Thu Aug 07, 2025 1:36 am

Hi.
I expect the PDF to be generated as shown in the screenshot.
I have attached the PDF in which the problem occurred, so please take a look.

matsufuji
 
Posts: 12
Joined: Tue Aug 06, 2024 4:57 am

Thu Aug 07, 2025 9:13 am

Hello,

Thank you for your feedback.
After our further investigation and confirmation, there are indeed the problems you mentioned in the java version and I have logged it into our bug tracking system with the ticket SPIREPDF-7666. Our dev team will investigate and fix it, once it is resolved or there is any update, I will notify you immediately. Apologize for the inconvenience caused.
Sincerely,
Talia
E-iceblue support team
User avatar

talia.liu
 
Posts: 331
Joined: Mon Apr 14, 2025 3:33 am

Wed Aug 27, 2025 2:59 am

Hello,
How is the progress on fixing the bugs?
Our paid Spire support will expire in August.
If the fixed version is released after September, will we be able to upgrade to the fixed version?

matsufuji
 
Posts: 12
Joined: Tue Aug 06, 2024 4:57 am

Wed Aug 27, 2025 8:00 am

Hello,

Thank you for your following up.
Please be advised that the current version of Spire.PDF for Java does not support the rendering of surrogate pair characters. This capability is treated as a new feature and is currently under active development. However, due to its significant technical complexity, we regret to inform you that it is unlikely to be completed before your current license expires. Therefore, you will need to renew your license to obtain the version that includes this functionality.
Sincerely,
Talia
E-iceblue support team
User avatar

talia.liu
 
Posts: 331
Joined: Mon Apr 14, 2025 3:33 am

Thu Aug 28, 2025 12:27 am

Understood.
We will consider renewing the license when new features are added.
We look forward to hearing from you about the feature updates.

matsufuji
 
Posts: 12
Joined: Tue Aug 06, 2024 4:57 am

Thu Aug 28, 2025 2:10 am

Hello,

Thank you for your understanding.
We will keep you updated on any developments. We apologize for any inconvenience this may have caused.
Sincerely,
Talia
E-iceblue support team
User avatar

talia.liu
 
Posts: 331
Joined: Mon Apr 14, 2025 3:33 am

Fri Jan 23, 2026 10:02 am

Hello,

Thank you for your patience.
We just release official version(Spire.Pdf.Java.12.1.4) which fixed the issue(SPIREPDF-7666), welcome to test. Looking forward to your testing feedback.
Website link: https://www.e-iceblue.com/Download/pdf-for-java.html
Sincerely,
Talia
E-iceblue support team
User avatar

talia.liu
 
Posts: 331
Joined: Mon Apr 14, 2025 3:33 am

Return to Spire.PDF

cron