Class RotatePagesJob
A job that allows rotation of specific pages in a PDF file.
Namespace: Adobe.PDFServicesSDK.pdfjobs.jobs
Assembly: Adobe.PDFServicesSDK.Doc.dll
Syntax
public class RotatePagesJob : 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 firstPageRange = new PageRanges();
pageRangeForDeletion.addSinglePage(1);
RotatePagesParams rotatePagesParams = RotatePagesParams.RotatePagesParamsBuilder()
.withAngleToRotatePagesBy(Angle._90, firstPageRange)
.Build();
RotatePagesJob rotatePagesJob = new RotatePagesJob(asset, rotatePagesParams);
String location = pdfServices.Submit(rotatePagesJob);
PDFServicesResponse<RotatePagesResult> pdfServicesResponse =
pdfServices.GetJobResult<RotatePagesResult>(location, typeof(RotatePagesResult));
IAsset resultAsset = pdfServicesResponse.Result.Asset;
StreamAsset streamAsset = pdfServices.GetContent(resultAsset);
Constructors
RotatePagesJob(IAsset, RotatePagesParams)
Constructs a new RotatePagesJob
instance.
Declaration
public RotatePagesJob(IAsset asset, RotatePagesParams rotatePagesParams)
Parameters
Type | Name | Description |
---|---|---|
IAsset | asset | The input IAsset for the job; can not be null. |
Rotate |
rotatePagesParams | The input Rotate |
Methods
SetOutput(IAsset)
Sets the output asset for the job.
Declaration
public RotatePagesJob SetOutput(IAsset asset)
Parameters
Returns
Type | Description |
---|---|
Rotate |
|
Remarks
External assets can be set as output only when input is external asset as well