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 May 19, 2022 10:40 am

Hello

We are currently having huge problems when writing PDFs with metadata.
When trying to save the PDF, Android throws an OutOfMemory-Error.
So, we wrote a test-app which simply creates a new PDF, adds 20 medium-sized images to the custom metadata (encoded as Base64) and saves the PDF.
These images are 20-30 MB in total, so we were curious as to why this would lead to a OoM-Error.
So, we used Android Studios profiler to see what is up. You can find the screenshot in the attachments.

Basically, the app consumes ~150 MB of memory. But as soon as the call to save the PDF is made, memory consumption sky-rockets to almost 1 GB!
This leads us to believe, that there is something wrong with the way PDFs get saved for Android, possibly only if using custom metadata.
When saving a ~30 MB file, this should not need more memory than usual.

I have attached our test project as well.

Could you please have a look at it and see if this really is an issue with "Spire.PDF for Android via Java V4.1.0", or if we are doing something wrong?

P.S: I even tried to apply our license key to make sure the memory consumption isn't generated by the watermark that gets applied.
But with or without applied license key, the behaviour is the same.

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

Fri May 20, 2022 11:51 am

Hi,

Thanks for your inquiry.
I reproduced the "memory consumption" issue and logged it into our bug tracking system with ticket SPIREPDF-5211. Our dev team will investigate this issue, once there is any good news, I will inform you. Apologize for the inconvenience caused.

Sincerely,
Nina
E-iceblue support team
User avatar

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

Fri Jun 17, 2022 9:32 am

Hi

Are there any news regarding this issue?
Has it been confirmed that this is a problem with the Spire.PDF library and not the result of some PDF specification or Android limitation?
And if it is an issue, is there a rough estimation until when the problem can be fixed?

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

Fri Jun 17, 2022 10:10 am

Hi,

Sorry your issue is not resolved yet. Our Dev team investigated it but haven't found a good solution due to its complexity. Sorry I can't provide an estimate time at this moment. Please spare us more time, if there is any meaningful progress, I will inform you.

Sincerely,
Nina
E-iceblue support team
User avatar

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

Tue Jul 19, 2022 8:33 am

Hey

After another month I'm curious to hear if there's been any meaningful progress.
Currently we have to restrict the user from doing some stuff on Android while with our Windows-App (Spire.PDF for .Net) he can create pretty huge PDFs.
So it's not that ideal.

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

Tue Jul 19, 2022 9:19 am

Hello,

Our Dev team did some adjustments on your issue, but it is still not completely resolved. They are speeding up to fix it now, please spare us more time. Sorry for this delay and thanks for your understanding.

Sincerely,
Nina
E-iceblue support team
User avatar

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

Tue Aug 23, 2022 5:36 am

Hello

This is the monthly reminder that we still desperately need this to be resolved.

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

Tue Aug 23, 2022 8:02 am

Hi,

Sorry this issue is still not resolved yet. I have urged our dev team again and they will speed up to fix it. I will keep you informed if it is resolved. Sorry for this delay and thanks for your understanding.

Sincerely,
Nina
E-iceblue support team
User avatar

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

Thu Oct 27, 2022 2:04 pm

Hello

I see that on the download page of Spire.PDF for Android via Java it says that there was a release of version 8.8.1.
This is currious, since the previous version was 4.1 and the "What's new" page also only knows about 4.1 (https://www.e-iceblue.com/Introduce/pdf ... 1qO13ZBxaQ).
I can pull the version with Gradle, so there really seems to be a version 8.8.1.

But can you please clarify what exactly the changes between 4.1 and 8.8.1 are?
Should this fix my issue?

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

Fri Oct 28, 2022 7:20 am

Hi,

Yes, we released the Spire.PDF for Android via Java 8.8.1 on 2022/8/30, you can check the following link to see the change details. But unfortunately, your issue is not fixed in this version. Our dev team haven't found a breakthrough to figure your issue out due to its complexity. I have urged them again. Please spare us more time. I will keep you informed once there is any good news.
https://www.e-iceblue.com/news/spire-pdf-java/Spire.PDF-for-Android-via-Java-8.8.1-enhances-the-conversion-from-PDF-to-DOCX.html

Sincerely,
Nina
E-iceblue support team
User avatar

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

Return to Spire.PDF