Copy link to clipboard
I am using Adobe tools api for combining PDFs to single file. The code is very stragihgt forward.
It is a .NET wcf web service. however, I got the following error.
Response received from the request: The underlying connection was closed: An unexpected error occurred on a send.
Here is the code:
Credentials credentials = Credentials.ServiceAccountCredentialsBuilder()
.FromFile(adobelicen + "/pdftools-api-credentials.json")
ExecutionContext executionContext = ExecutionContext.Create(credentials);
CombineFilesOperation combineFilesOperation = CombineFilesOperation.CreateNew();
String files = source.Split(',');
FileRef firstFileToCombine = FileRef.CreateFromLocalFile(files);
PageRanges pageRangesForFirstFile = GetPageRangeForPDF();
// Add the first file as input to the operation, along with its page range.
// Create a second FileRef instance using a local file.
FileRef secondFileToCombine = FileRef.CreateFromLocalFile(files);
PageRanges pageRangesForSecondFile = GetPageRangeForPDF();
/*FileRef thridFileToCombine = FileRef.CreateFromLocalFile(@"aerial.pdf");
// Execute the operation.
FileRef result = combineFilesOperation.Execute(executionContext);
// Save the result to the specified location.
Have something to add?