we are using Aspose Pdf for Java (Version 19.10) and it seems that there is a problem with converting pdf file to image file, e.g. png.
Our customer want to convert their pdf documents into png image files. Normally this works really fine .
In given case we do have a 5MB pdf file that contains an svg image (probably the cause of the problem).
Converting to png leads to
- excessive memory consumption >2GB
- converting seems to run endlesly (>5h)
- high CPU performance
Problem occurs after calling convert in RgbToDeviceGrayConversionStrategy
RgbToDeviceGrayConversionStrategy strategy = new RgbToDeviceGrConversionStrategy();
Process of converting is done on our application server and therefore it highly endangers the stability of our application.
- Is there any possibility to avoid this problem?
(parameter for RgbToDeviceGrayConversionStrategy or RenderingOptions or others?)
- Is there any chance to detect problem pdf files before start of conversion, e.g. detect svg content in pdf file? (Missing image file is better than pausing application)
- Is there any chance to cancel the converting process?
I have added a file to reproduce the problem.
TestAsposePdf2Png.zip (4.5 MB)
Thanks a lot.