Show / Hide Table of Contents

Class ReorderPagesPDFJob

A job that allows to rearrange pages in a PDF file according to the specified order.

Inheritance
System.Object
PDFServicesJob
ReorderPagesPDFJob
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
ReorderPagesParams reorderPagesParams

The input ReorderPagesParams for the job; can not be null.

Methods

SetOutput(IAsset)

Sets the output asset for the job.

Declaration
public ReorderPagesPDFJob SetOutput(IAsset asset)
Parameters
Type Name Description
IAsset asset

IAsset object representing the output asset; can not be null.

Returns
Type Description
ReorderPagesPDFJob

ReorderPagesPDFJob instance

Remarks

External assets can be set as output only when input is external asset as well

In This Article
  • Constructors
    • ReorderPagesPDFJob(ReorderPagesParams)
  • Methods
    • SetOutput(IAsset)
Back to top Copyright © 2020 Adobe. All rights reserved.