Hi,
I tried to convert entire PDF to PNG files using GroupDocs 3.0.0 for Java. It works fine in Windows, but not working in Linux.
File file = resource.getFile();
InputStream input = new FileInputStream(file);
String fileName = file.getName();
ImageSaveOptions options = new ImageSaveOptions();
options.setConvertFileType(FileType.Png);
long start = System.currentTimeMillis();
List converts = CONVERSION_HANDLER.convert(input, fileName, options);
long finish = System.currentTimeMillis();
LOGGER.info("Time taken to convert all pages (file size: {}, total pages: {})): {} ms", file.length(),
converts.size(), (finish - start));
Error:
Exception in thread "main" class com.groupdocs.foundation.a.a: class com.groupdocs.foundation.a.a: File not found File: /tmp/appassembler/bin/Data/Cache/JavaPersistence.pdf/1/JavaPersistence.png
com.groupdocs.conversion.handler.cache.a.a.getOutputSaveStreamInternal(Unknown Source)
com.groupdocs.conversion.converter.b.pR(Unknown Source)
com.groupdocs.conversion.converter.c.d.pR(Unknown Source)
com.groupdocs.conversion.converter.c.f.a(Unknown Source)
com.groupdocs.conversion.handler.ConversionHandler.f(Unknown Source)
com.groupdocs.conversion.handler.ConversionHandler.a(Unknown Source)
com.groupdocs.conversion.handler.ConversionHandler.a(Unknown Source)
com.groupdocs.conversion.handler.ConversionHandler.convert(Unknown Source)
com.abc.ConvertAllPages.main(ConvertAllPages.java:37) ---> class com.groupdocs.foundation.a.a: File not found File: /tmp/appassembler/bin/Data/Cache/JavaPersistence.pdf/1/JavaPersistence.png
com.groupdocs.conversion.handler.cache.a.a.getOutputSaveStreamInternal(Unknown Source)
com.groupdocs.conversion.converter.b.pR(Unknown Source)
com.groupdocs.conversion.converter.c.d.pR(Unknown Source)
com.groupdocs.conversion.converter.c.f.a(Unknown Source)
com.groupdocs.conversion.handler.ConversionHandler.f(Unknown Source)
com.groupdocs.conversion.handler.ConversionHandler.a(Unknown Source)
com.groupdocs.conversion.handler.ConversionHandler.a(Unknown Source)
com.groupdocs.conversion.handler.ConversionHandler.convert(Unknown Source)
com.abc.ConvertAllPages.main(ConvertAllPages.java:37)
--- End of inner exception stack trace ---
com.groupdocs.conversion.converter.c.f.a(Unknown Source)
com.groupdocs.conversion.handler.ConversionHandler.f(Unknown Source)
com.groupdocs.conversion.handler.ConversionHandler.a(Unknown Source)
com.groupdocs.conversion.handler.ConversionHandler.a(Unknown Source)
com.groupdocs.conversion.handler.ConversionHandler.convert(Unknown Source)
com.abc.ConvertAllPages.main(ConvertAllPages.java:37)
at com.groupdocs.conversion.converter.c.f.a(Unknown Source)
at com.groupdocs.conversion.handler.ConversionHandler.f(Unknown Source)
at com.groupdocs.conversion.handler.ConversionHandler.a(Unknown Source)
at com.groupdocs.conversion.handler.ConversionHandler.a(Unknown Source)
at com.groupdocs.conversion.handler.ConversionHandler.convert(Unknown Source)
at com.abc.ConvertAllPages.main(ConvertAllPages.java:37)
Caused by: class com.groupdocs.foundation.a.a: File not found File: /tmp/appassembler/bin/Data/Cache/JavaPersistence.pdf/1/JavaPersistence.png
com.groupdocs.conversion.handler.cache.a.a.getOutputSaveStreamInternal(Unknown Source)
com.groupdocs.conversion.converter.b.pR(Unknown Source)
com.groupdocs.conversion.converter.c.d.pR(Unknown Source)
com.groupdocs.conversion.converter.c.f.a(Unknown Source)
com.groupdocs.conversion.handler.ConversionHandler.f(Unknown Source)
com.groupdocs.conversion.handler.ConversionHandler.a(Unknown Source)
com.groupdocs.conversion.handler.ConversionHandler.a(Unknown Source)
com.groupdocs.conversion.handler.ConversionHandler.convert(Unknown Source)
com.abc.ConvertAllPages.main(ConvertAllPages.java:37)
at com.groupdocs.conversion.handler.cache.a.a.getOutputSaveStreamInternal(Unknown Source)
at com.groupdocs.conversion.converter.b.pR(Unknown Source)
at com.groupdocs.conversion.converter.c.d.pR(Unknown Source)
... 6 more
Folder that is created in cache folder:
/tmp/appassembler/bin/Data/Cache/JavaPersistence.pdf\1
Thanks