We're sorry AsposeCloud doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.cloud

How to Convert Word Document to PDF with Greek Letters

Hi Team,

I’m looking to understand if the Greek language and literals are supported in docx to pdf conversion or not. We are trying to access via an available plugin from Appian BPM cloud platform. Anyhelp in this regards is much appreciated.

Thanks in advance!

@bhavikav

Yes, you can convert a Word Document to PDF with Greek language and literals using Aspose.Words REST API. It supports the conversion with custom fonts. For this purpose, first, you need to upload custom fonts to cloud storage and later pass the folder path in fontsLocation parameter. Please check the sample code for the conversion. Hopefully, it will help you to accomplish the task. Please let us know if you face any issues in this regard.

Steps to Convert DOCX to PDF in Java

  1. First thing first, sign up with aspose.cloud and get the credentials
  2. Create a new Maven Java project in Java IDE and add Aspose.Words Cloud API Maven repository dependency
  3. Create an initialize instance of Aspose.Words Cloud API
  4. Read a Word Document as a byte array and convert to PDF using convertDocument object
  5. Save output PDF document from response to the local drive

How to Convert DOCX to PDF in Java

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;

import com.aspose.words.cloud.ApiClient;
import com.aspose.words.cloud.ApiException;
import com.aspose.words.cloud.api.WordsApi;
import com.aspose.words.cloud.model.requests.ConvertDocumentRequest;

public class ConvertDOCXtoPDF {

	public static void main(String[] args) throws IOException, ApiException {
		// TODO Auto-generated method stub
		// Get Client ID and Secret from https://dashboard.aspose.cloud/
		// Create an instance of Aspose.Word Cloud
		ApiClient apiClient = new ApiClient(/*clientId*/ "xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx", /*clientSecret*/ "xxxxxxxxxxxxxxxx", "https://api.aspose.cloud");
		WordsApi wordsApi = new WordsApi(apiClient);
		apiClient.setConnectTimeout(12*60*1000);
		apiClient.setReadTimeout(12*60*1000);
		apiClient.setWriteTimeout(12*60*1000);
		
		String inputFile="C:/Temp/02_pages.docx";
		String outputFile="C:/Temp/02_pages_java.pdf";
		// Custom fonts folder in cloud storage
		String fontLocation="Fonts";
		
		// Convert DOCX to PDF with custom fonts from local drive
		byte[] requestDocument = Files.readAllBytes(Paths.get(inputFile).toAbsolutePath());
		ConvertDocumentRequest convertRequest = new ConvertDocumentRequest(requestDocument, "pdf", null, null, null, fontLocation);
		File convertDOCXtoPDFJava = wordsApi.convertDocument(convertRequest);
		System.out.println("api request completed...");
	    
		// Save output PDF to local drive
		File dest = new File(outputFile);
		Files.copy(convertDOCXtoPDFJava.toPath(), dest.toPath(),
		java.nio.file.StandardCopyOption.REPLACE_EXISTING);

	}

}