Hi,
I’m using the TextFragmentAbsorber to replace text in a pdf document and I’m seeing some very odd behavior in relation to memory usage. I have a 13 MB PDF file with 1 page of text to verify the replace and 64 pages of images. The file doesn’t really matter, but it was one where this behavior was obvious. I am on the latest Aspose.PDF version(18.6).
When I use the TextFragmentAbsorber without setting a license file it runs quickly and uses less than 100MB of memory. When I set a license file, it runs slower and uses 1GB of memory. The memory steadily rises when calling pdfDocument.Pages.Accept(textFragmentAbsorber).
I uploaded a .zip with a console app that can reproduce this in my google drive: https://drive.google.com/open?id=1ACvqGPUS6JWeNo_pq-owSpQwfILyXhgb
Repro steps:
- Download the zip and open the .sln
- Restore the nuget packages
- Run it once without setting a license file
** Notice that the replace worked and that memory usage never went above 100MB - Add a license file and uncomment the SetLicense lines
- Run it and notice that memory climbed to 1GB
I have looked through the forums and API documentation to see if there was something I was missing but wasn’t able to find anything.
Thank you for any help you can offer,
-Josh