@mubeenraoofm
It sounds like you’re encountering a couple of issues with temporary file management in Aspose.PDF for Java.
Cause:
The behavior you’re experiencing with temporary files not being deleted until the JVM exits is a known issue in the library.
Solution:
Currently, there isn’t a public API available to explicitly release or delete these temp files. However, you can implement the following workarounds:
-
Manual Cleanup: Implement a manual cleanup process in your application. This could involve periodically checking the temp directory where Aspose stores these files and deleting any that are older than a certain threshold.
-
Use of PdfContentEditor
: When using PdfContentEditor
, ensure that you are closing the editor instance properly. While this may not always trigger cleanup, combining this with manual cleanup will help manage temporary files more effectively.
Next Steps:
- Monitor your disk space usage, especially if your application runs for extended periods without restarting.
- Consider implementing the manual cleanup routine as soon as possible to prevent potential disk space issues.
If you have further questions or need assistance with implementing a cleanup routine, please feel free to ask! Thank you for your understanding, and I hope this helps!
Temporary files are only cleared when the application is restarted, which is not feasible in production due to potential disruptions. This behavior needs to be addressed in the API itself. Please provide a fix or enhancement that ensures these temporary files are automatically managed and do not require an application restart.
@mubeenraoofm
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): PDFJAVA-45321
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.