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.

Thu Jul 31, 2025 10:25 am

Hi,

Thanks for your patient waiting.
Glad to inform you that we released the official Spire.PDF for Android Version:10.6.8, which contains the fixes of your issue and we upgrade the namespace for license. Please download the official version and use the following code to apply your license.
Code: Select all
com.spire.pdf.license.LicenseProvider.setLicenseKey("your license key");

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1385
Joined: Tue Sep 27, 2016 1:06 am

Wed Aug 06, 2025 6:20 am

Hi

Thanks for providing a new version in the promised time frame.

Unfortunately, it seems like this official release broke something again.

If I run the provided test example with the unofficial jar file, it works and all four PDFs are produced.
But if I use the official V10.6.8 from your Maven repository, the last PDF is not saved.
When I try to save the encrypted PDF/A, I get the following error:

Code: Select all
2025-08-06 08:14:21.532  7254-7254  AndroidRuntime          com.example.spiretest                E  FATAL EXCEPTION: main
                                                                                                    Process: com.example.spiretest, PID: 7254
                                                                                                    java.lang.ExceptionInInitializerError
                                                                                                       at com.spire.pdf.packages.sprupx.spr┘⌧(Font.java:411)
                                                                                                       at com.spire.pdf.packages.sprupx.<init>(Font.java:399)
                                                                                                       at com.spire.pdf.packages.sprupx.<init>(Font.java:375)
                                                                                                       at com.spire.pdf.PdfDocumentBase.spr▤▏(PdfDocumentBase.java:1699)
                                                                                                       at com.spire.pdf.PdfDocumentBase.spr┣▐(PdfDocumentBase.java:1689)
                                                                                                       at com.spire.pdf.packages.spromq.spr︴‘(PdfDocumentWidget.java:674)
                                                                                                       at com.spire.pdf.PdfDocumentBase.save(PdfDocumentBase.java:910)
                                                                                                       at com.spire.pdf.PdfDocument.saveToFile(PdfDocument.java:1570)
                                                                                                       at com.example.spiretest.FirstFragment.onViewCreated(FirstFragment.java:91)
[...]
2025-08-06 08:14:21.533  7254-7254  AndroidRuntime          com.example.spiretest                E  Caused by: java.lang.RuntimeException: Couldn't open the font file
                                                                                                       at com.spire.pdf.packages.sprbky.<init>(SfntlyFontPeer.java:54)
                                                                                                       at com.spire.pdf.packages.sprbky.<init>(SfntlyFontPeer.java:36)
                                                                                                       at com.spire.pdf.packages.sprbxx.spr⌬۩–(FontManager.java:530)


It seems, there is something which changed from the preview version to the official release which broke fonts in PDF/A with enabled encryption :(

Can you try to reproduce this issue so we know it's not something weird on my machine? I am trying it on an emulator with Android 11 and one with Android 15.

RicoScheller
 
Posts: 52
Joined: Tue Jul 02, 2019 10:34 am

Wed Aug 06, 2025 10:11 am

Hi,

I will investigate this issue and give you feedback later.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1385
Joined: Tue Sep 27, 2016 1:06 am

Thu Aug 07, 2025 2:29 am

Hi,

Thanks for your patient waiting.
I tested the official version 10.6.8 on an Android 14 device, and all four documents were generated smoothly without any issues. I've attached the screenshot for your reference. Could you please confirm if there have been any recent changes to the related code on your side?

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1385
Joined: Tue Sep 27, 2016 1:06 am

Thu Aug 07, 2025 6:05 am

Hmmm, but does the file have something in it, can you open it?

My behaviour is as follows:

- App starts with a white screen and then crashes (it should display the text "First Fragment" after a while)
- File is created, but has 0 Bytes. PDF-XChange shows the error "Error [PXVLib]: File is empty." when trying to open it.
- Normal console shows no error.
- Logcat shows the error.

Logcat_and_empty_file.png


I have attached my current code.

RicoScheller
 
Posts: 52
Joined: Tue Jul 02, 2019 10:34 am

Thu Aug 07, 2025 10:15 am

Hi,

Thanks for your feedback.
We have conducted test on our side and did not observe the error message in Logcat. The fields in the generated documents appear correctly. Please find the my generated files for your reference.

Have you recently switched to a different emulator or physical device? I suspect that you may have made some changes on your end.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1385
Joined: Tue Sep 27, 2016 1:06 am

Return to Spire.PDF