This gist explains the steps and code snippet on how to convert DOC to PDF format using Aspose.Words Cloud SDK for Java.
For more information, please visit
This gist explains the steps and code snippet on how to convert DOC to PDF format using Aspose.Words Cloud SDK for Java.
For more information, please visit
This Gist contains code snippets related to conversion DOC file to PDF using Aspose.Words Cloud SDK for Java |
// Get clientId and clientSecret from https://dashboard.aspose.cloud/ | |
String clientId = "718e4235-8866-4ebe-bff4-f5a14a4b6466"; | |
String clientSecret = "388e864b819d8b067a8b1cb625a2ea8e"; | |
// if baseUrl is null, WordsApi uses default https://api.aspose.cloud | |
// create an object of ApiClient by providing user specific ClientID and Client Secret | |
ApiClient apiClient = new ApiClient(clientId,clientSecret,null); | |
// create an object of WordsApi by providing ApiClient as argument | |
WordsApi wordsApi = new WordsApi(apiClient); | |
// input Word document path | |
String inputFileName = "/Users/nayyershahbaz/Downloads/TableDocument.doc"; | |
// resultant file format | |
String format = "pdf"; | |
// Create an instance of ConvertDocumentRequest | |
ConvertDocumentRequest request = new ConvertDocumentRequest(Files.readAllBytes(Paths.get(inputFileName)), format, "Converted.pdf", null, null, null); | |
// perform document conversion | |
File result = wordsApi.convertDocument(request); |