PDF Conversion Error - Word 2 PDF

New Here ,
Jul 28, 2021 Jul 28, 2021

Copy link to clipboard

Copied

I am using java sdk for pdf conversion using the following code:

Credentials credentials = Credentials.serviceAccountCredentialsBuilder().fromFile("pdftools-api-credentials.json").build();


ExecutionContext executionContext = ExecutionContext.create(credentials);


CreatePDFOperation createPdfOperation = CreatePDFOperation.createNew();

 

FileRef source = FileRef.createFromLocalFile( Utils.getDataDir() + fileId + "." + extension);
createPdfOperation.setInput(source);


FileRef result = createPdfOperation.execute(executionContext);

result.saveAs(Utils.getDataDir() + fileId.split("\\.")[0] + ".pdf");

 

And I get the following error on the line in bold:

 

om.adobe.platform.operation.exception.ServiceApiException: description ='An Internal Server Error has occurred.; transactionId=4p5gjnmi8oMoRm2IaeQmrs7kHeaiSNFr'; requestTrackingId='4p5gjnmi8oMoRm2IaeQmrs7kHeaiSNFr'; statusCode=500

at com.adobe.platform.operation.pdfops.CreatePDFOperation.execute(CreatePDFOperation.java:196) ~[pdftools-sdk-1.2.0.jar!/:na]

 

Do someone have an idea what can be the reason??

Views

24

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation