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.