Skip to main content
Participant
July 25, 2021
Question

PDF Conversion Error - Word 2 PDF

  • July 25, 2021
  • 1 reply
  • 422 views

Hi, 

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??

 

This topic has been closed for replies.

1 reply

Legend
July 25, 2021

This is not the Acrobat SDK. Are you using  the Document Cloud SDK? Try here: https://community.adobe.com/t5/document-services-apis/bd-p/Document-Cloud-SDK?page=1&sort=latest_replies&filter=all