HTML
JPG
PDF
XML
DOCX
PDF
How to rotate PDF via Cloud .NET SDK
To rotate PDF documents, we’ll use Aspose.PDF Cloud .NET SDK This Cloud SDK allows you to easily build cloud-based PDF creator, editor & converter apps in C#, ASP.NET, or other .NET languages for various cloud platforms. Open NuGet package manager, search for Aspose.PDF Cloud and install. You may also use the following command from the Package Manager Console.
Package Manager Console Command
PM> Install-Package Aspose.Pdf-Cloud
Steps to Rotate PDF using .NET SDK
Aspose.PDF Cloud developers can easily load & Rotate PDF in just a few lines of code.
- Upload the PDF to the cloud.
- Set Parameters for Page Rotation.
- Rotate the specified pages using the desired angle.
- Download the modified PDF.
Rotate PDF using .NET Cloud SDK
using Aspose.Pdf.Cloud.Sdk.Api;
using Aspose.Pdf.Cloud.Sdk.Model;
namespace ChangeLayout
{
public class RotateDocumentsPages
{
private ChangeLayoutHelper _helper;
public RotateDocumentsPages(ChangeLayoutHelper helper)
{
_helper = helper;
}
public async Task MakeRotateDocumentsPages(string document, string rotateAngle, string pages)
{
await _helper.UploadFile(document);
AsposeResponse response = await _helper.pdfApi.PostDocumentPagesRotateAsync(document, rotateAngle, pages, folder: _helper.config.REMOTE_TEMP_FOLDER);
if (response.Code != 200)
Console.WriteLine("MakeRotateDocumentsPages(): Unexpected error!");
else {
Console.WriteLine("MakeRotateDocumentsPages(): Pages '{0}' successfully rotated!");
await _helper.DownloadFile(document, "rotated_");
}
}
}
}