Free Support Forum - aspose.cloud

Document conversion using aspose.words cloud API issue

Hi,
I am using Aspose.Words Cloud API for doc(x) conversion to PDF without using cloud storage.
The code snippet I am using is as -

import java.io.File;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import com.aspose.words.api.WordsApi;
import com.aspose.words.model.ResponseMessage;

public class ConvertDocumentToFormatExample {

public static void main(String... argc) {
  try{

		WordsApi wordsApi = new WordsApi("MY_API_KEY",
				"MY_SID", false);
		String format = "pdf";
		String outPath = "";
		ResponseMessage apiResponse = wordsApi.PutConvertDocument(format, outPath, new File("path_to_doc_file"));
		if (apiResponse != null && apiResponse.getInputStream() != null) {
			InputStream responseStream = apiResponse.getInputStream();
			final Path destination = Paths.get("output.pdf");
			Files.copy(responseStream, destination, StandardCopyOption.REPLACE_EXISTING);
			System.out.println("conversion completed");
		}

	} catch (Exception e) {
	  e.printStackTrace();
  }
}

}

I am getting error as -
com.aspose.words.client.ApiException: {“Message”:“MIME multipart content is not supported by the operation.”}
at com.aspose.words.client.ApiInvoker.invokeAPI(ApiInvoker.java:262)
at com.aspose.words.api.WordsApi.PutConvertDocument(WordsApi.java:765)
at com.alphasense.docconverter.ConvertDocumentToFormatExample.main(ConvertDocumentToFormatExample.java:21)

Please let me know what is incorrect in my request

@poojard

Thanks for your inquiry. We have tested the scenario and noticed the reported issue with the Aspose.Words for Cloud for Java SDK. We are coordinating with our Cloud team and we will update you our findings soon.

We are sorry for the inconvenience.

Thanks Tilal.

Please update me as soon as you get any updates from SDK team on priority.

@poojard

Thanks for your feedback. Sure, we have logged a ticket SDKDEV-533 with high priority for the issue and will notify you as soon as it is resolved

@poojard

Thanks for your patience. Please note above reported issue SDKDEV-533 has been fixed in Aspose.Words for Cloud for Java SDK 10.8.0. It is pushed to Maven/GitHub as well.