PDFServicesSDK throws ServiceApiException Cannot send a content-body with this verb-type | Community
Skip to main content
April 3, 2024
Question

PDFServicesSDK throws ServiceApiException Cannot send a content-body with this verb-type

  • April 3, 2024
  • 0 replies
  • 553 views

Consistently receive this error when executing a CreatePDFOperation:

Credentials credentials = Credentials.ServicePrincipalCredentialsBuilder()
.WithClientId("myclientid")
.WithClientSecret("myclientsecret")
.Build();

Adobe.PDFServicesSDK.ExecutionContext executionContext = Adobe.PDFServicesSDK.ExecutionContext.Create(credentials);

CreatePDFOperation createPDFOperation = CreatePDFOperation.CreateNew();

FileRef flSource = FileRef.CreateFromStream(inputstream, CreatePDFOperation.SupportedSourceFormat.DOCX.GetMediaType());

createPDFOperation.SetInput(flSource);

 

Throws exception here:

FileRef flResult = createPDFOperation.Execute(executionContext);

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.