How to rotate a range of pages in a PDF in C# .NET Framework

Install-Package Cloudmersive.APIClient.NET.DocumentAndDataConvert -Version 2.2.0
using System;using System.Diagnostics;using Cloudmersive.APIClient.NET.DocumentAndDataConvert.Api;using Cloudmersive.APIClient.NET.DocumentAndDataConvert.Client;using Cloudmersive.APIClient.NET.DocumentAndDataConvert.Model;namespace Example{public class EditPdfRotatePageRangeExample{public void main(){// Configure API key authorization: ApikeyConfiguration.Default.AddApiKey("Apikey", "YOUR_API_KEY");// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed// Configuration.Default.AddApiKeyPrefix("Apikey", "Bearer");var apiInstance = new EditPdfApi();var inputFile = new System.IO.Stream(); // System.IO.Stream | Input file to perform the operation on.var rotationAngle = 56;  // int? | The angle to rotate the page in degrees, must be a multiple of 90 degrees, e.g. 90, 180, 270, or -90, -180, -270, etc.var pageStart = 56;  // int? | Page number (1 based) to start rotating pages from (inclusive).var pageEnd = 56;  // int? | Page number (1 based) to stop rotating pages from (inclusive).try{// Rotate a range, subset of pages in a PDF documentbyte[] result = apiInstance.EditPdfRotatePageRange(inputFile, rotationAngle, pageStart, pageEnd);Debug.WriteLine(result);}catch (Exception e){Debug.Print("Exception when calling EditPdfApi.EditPdfRotatePageRange: " + e.Message );}}}}

--

--

--

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

3D Racing is Live!

When to Use Self-Healing in Test Automation

A viewer can skip watching a TrueView in-stream ad after:

3 Main Reasons & Solutions when Hard Drive Fails to Spin Up

Introduction to Data Structures: Part 5, Trees

How to run Google Colab Locally

How to filter Adjectives from a String in Python

10 Mac Apps For June

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Cloudmersive

Cloudmersive

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

More from Medium

Query an XML file using XQuery, Get Results in C#

C#/VB.NET: Convert Word or Excel Files to Text

MinIO SDK Using REST API .NET

How to Build a .NET MAUI Barcode and QR Code Reader for Windows and Android