Class ReorderPagesPDFJob
A job that allows to rearrange pages in a PDF file according to the specified order.
Namespace: Adobe.PDFServicesSDK.pdfjobs.jobs
Assembly: Adobe.PDFServicesSDK.Doc.dll
Syntax
public class ReorderPagesPDFJob : PDFServicesJob
Examples
Sample Usage:
using Stream inputStream = 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 asset = pdfServices.Upload(inputStream, PDFServicesMediaType.PDF.GetMIMETypeValue());
PageRanges pagesToReorder = new PageRanges();
pageRanges.AddRange(3, 4);
pageRanges.AddSinglePage(1);
ReorderPagesParams reorderPagesParams = ReorderPagesParams
.reorderPagesParamsBuilder(asset, pagesToReorder)
.Build();
ReorderPagesPDFJob reorderPagesPDFJob = new ReorderPagesPDFJob(reorderPagesParams);
String location = pdfServices.Submit(reorderPagesPDFJob);
PDFServicesResponse<ReorderPagesResult> pdfServicesResponse =
pdfServices.GetJobResult<ReorderPagesResult>(location, typeof(ReorderPagesResult));
IAsset resultAsset = pdfServicesResponse.Result.Asset;
StreamAsset streamAsset = pdfServices.GetContent(resultAsset);
Constructors
ReorderPagesPDFJob(ReorderPagesParams)
Constructs a new ReorderPagesPDFJob
instance.
Declaration
public ReorderPagesPDFJob(ReorderPagesParams reorderPagesParams)
Parameters
Type | Name | Description |
---|---|---|
Reorder |
reorderPagesParams | The input Reorder |
Methods
SetOutput(IAsset)
Sets the output asset for the job.
Declaration
public ReorderPagesPDFJob SetOutput(IAsset asset)
Parameters
Returns
Type | Description |
---|---|
Reorder |
|
Remarks
External assets can be set as output only when input is external asset as well