PPT to PNG conversion issue in Java

Hello,


Could you please check below error? (latest version 3.0.0)
-------------------------------------
“class com.groupdocs.conversion.internal.c.a.s.jI —> class com.groupdocs.conversion.internal.c.a.s.f.aa —> class com.groupdocs.conversion.internal.c.a.s.f.an: Error reading pptx presentation: can’t find “/_rels/.rels” entry.
com.groupdocs.conversion.internal.c.a.s.f.q.for(Unknown Source)
com.groupdocs.conversion.internal.c.a.s.f.bC.(Unknown Source)
com.groupdocs.conversion.internal.c.a.s.f.q.(Unknown Source)
com.groupdocs.conversion.internal.c.a.s.f.al.(Unknown Source)
com.groupdocs.conversion.internal.c.a.s.vJ.a(Unknown Source)
com.groupdocs.conversion.internal.c.a.s.jJ.f(Unknown Source)
com.groupdocs.conversion.internal.c.a.s.jJ.d(Unknown Source)
com.groupdocs.conversion.internal.c.a.s.jJ.(Unknown Source)
com.groupdocs.conversion.internal.c.a.s.jJ.(Unknown Source)
com.groupdocs.conversion.converter.c.g.a(Unknown Source)
com.groupdocs.conversion.converter.c.g.cbr(Unknown Source)
com.groupdocs.conversion.converter.c.d.a(Unknown Source)
com.groupdocs.conversion.handler.ConversionHandler.e(Unknown Source)
com.groupdocs.conversion.handler.ConversionHandler.convert(Unknown Source)
com.groupdocs.conversion.handler.ConversionHandler.convert(Unknown Source)
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)
— End of inner exception stack trace —
com.groupdocs.conversion.internal.c.a.s.f.bC.(Unknown Source)
com.groupdocs.conversion.internal.c.a.s.f.q.(Unknown Source)
com.groupdocs.conversion.internal.c.a.s.f”
-----------------------------------------------------------------------

Thanks
Vincent

Hello,


Thank You for posting your query.

We have tested the conversion of “ppt” file into “png images” using GroupDocs.Conversion for Java 3.0.0 and we are unable to reproduce your issue with this conversion.
So, could you please share your file examples with us, that we can investigate them and reproduce your issue.
Also it will be helpful if you can share your code example of this conversion, as it will speed up our investigation.

We will wait for your details.

Best Wishes.

Thanks for response.

Actually we got lots of same problem on testing server which running multiple same converting processes/threads. but when I tried to convert same file on my local laptop, it just worked fine. and when I tried to convert same file on server manually run the process, it also worked fine.
Do you have any suggestion about reason of issue based on the error message?

Regards,

Hello,


Thank You for your reply.

Can you please elaborate “multiple same converting processes/threads”, are you using multi threading in your code ?

Also it will be helpful for us if you can provide us the sample code as it will help us investigate the issue faster.

Waiting for your response.

Best Wishes.

Hi Vincent,


problem on testing server which running multiple same converting processes/threads.
We’d like to apprise you that converting documents to images using multi-threading issue is now resolved in latest release of the API (GroupDocs.Conversion for Java 16.10.1). Please download the latest version of the API and share your experience.

Best wishes
Hello,

Yes, we are using multi threading(about 3-4 threads). actually code is quite simple, some like:
---------------------------
public static void main(String[] args) {
try {
for (int n = 0; n < nThreads; n++) {
Runnable worker = new PrivateRunnable();
executor.execute(worker);
}

} catch (Exception ex) {
System.exit(0);
} finally {
}
}


public class PrivateRunnable implements Runnable {

@Override
public void run() {
try {
gis = handler.<List> convert(fileName,
imageOptions);
} catch (Exception ex) {

throw ex;
} catch (Throwable ex) {

throw ex;
}
}
}

------------------------------
Exception was thrown at line:
gis = handler.<List> convert(fileName,
imageOptions);


Hi Vincent,


Thanks for sharing the code.
We implemented same code at our end as follows and used the attached sample document (ppt file):

PrivateRunnable Class
public class PrivateRunnable implements Runnable {

@Override
public void run() {
try {
// Instantiating the conversion handler
ConversionHandler conversionHandler = new ConversionHandler(Utilities.getConfiguration());
SaveOptions saveOption = new ImageSaveOptions();
saveOption.setConvertFileType(ImageSaveOptions.ImageFileType.Png);
saveOption.setOutputType(OutputType.String);

List convertedDocumentPath = conversionHandler.<List> convert(“The butterfly effect.ppt”,saveOption);
List convertedDocumentPath2 = conversionHandler.<List> convert(“intelligent systems.pdf”, saveOption);

} catch (Exception ex) {

throw ex;
} catch (Throwable ex) {

throw ex;
}
}
}
MainClass
ExecutorService executor = Executors.newFixedThreadPool(1);
// Executor executor = null;
try {
for (int n = 0; n < nThread; n++) {

// convert to image and get result as path
Runnable worker = new PrivateRunnable();
executor.execute(worker);
}
} catch (Exception ex) {
System.exit(0);
} finally {
}

We didn’t get any exception, rather you can see the attached output files. Can you please share the problematic file?

Best Wishes