Class CombinePDFJob
A job that combines multiple PDF files into a single PDF file. Allows specifying which pages of the source files to combine.
Namespace: Adobe.PDFServicesSDK.pdfjobs.jobs
Assembly: Adobe.PDFServicesSDK.Doc.dll
Syntax
public class CombinePDFJob : PDFServicesJob
Examples
Sample Usage:
using Stream inputStream1 = File.OpenRead("<SOURCE_PATH>");
using Stream inputStream2 = File.OpenRead("<SOURCE_PATH>");
ICredentials credentials = new ServicePrincipalCredentials(
Environment.GetEnvironmentVariable("PDF_SERVICES_CLIENT_ID"),
Environment.GetEnvironmentVariable("PDF_SERVICES_CLIENT_SECRET"));
PDFServices pdfServices = new PDFServices(credentials);
IAsset asset1 = pdfServices.Upload(inputStream1, PDFServicesMediaType.PDF.GetMIMETypeValue());
IAsset asset2 = pdfServices.Upload(inputStream2, PDFServicesMediaType.PDF.GetMIMETypeValue());
CombinePDFParams combinePDFParams = CombinePDFParams.CombinePDFParamsBuilder()
.AddAsset(assets1)
.AddAsset(assets2)
.Build();
CombinePDFJob combinePDFJob = new CombinePDFJob(combinePDFParams);
String location = pdfServices.Submit(combinePDFJob);
PDFServicesResponse<CombinePDFResult> pdfServicesResponse =
pdfServices.GetJobResult<CombinePDFResult>(location, typeof(CombinePDFResult));
IAsset resultAsset = pdfServicesResponse.Result.Asset;
StreamAsset streamAsset = pdfServices.GetContent(resultAsset);
Constructors
CombinePDFJob(CombinePDFParams)
Constructs a new CombinePDFJob
instance.
Declaration
public CombinePDFJob(CombinePDFParams combinePDFParams)
Parameters
Type | Name | Description |
---|---|---|
Combine |
combinePDFParams | Combine |
Methods
SetOutput(IAsset)
Sets the output asset for the job.
Declaration
public CombinePDFJob SetOutput(IAsset asset)
Parameters
Returns
Type | Description |
---|---|
Combine |
|
Remarks
External assets can be set as output only when input is external asset as well