Skip to main content
Participant
July 28, 2021
Question

PDF Conversion Error - Word 2 PDF

  • July 28, 2021
  • 0 replies
  • 159 views

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.