Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Чтобы повернуть страницы в документе, мы можем использовать PageRotations.
PageRotations
содержит номер страницы и угол поворота, ключ представляет номер страницы, значение ключа представляет угол поворота в градусах.
// For complete examples and data files, visit https://github.com/aspose-pdf/Aspose.PDF-for-.NET
private static void RotatePages1()
{
// The path to the documents directory
var dataDir = RunExamples.GetDataDir_AsposePdf();
using (var editor = new Aspose.Pdf.Facades.PdfPageEditor())
{
// Bind PDF document
editor.BindPdf(dataDir + "sample.pdf");
// Specify the page rotation dictionary
editor.PageRotations = new System.Collections.Generic.Dictionary<int, int>
{
{ 1, 90 },
{ 2, 180 },
{ 3, 270 }
};
// Save PDF document
editor.Save(dataDir + "sample-rotate-a.pdf");
}
}
Мы также можем использовать Rotation свойство. Поворот должен быть 0, 90, 180 или 270
// For complete examples and data files, visit https://github.com/aspose-pdf/Aspose.PDF-for-.NET
private static void RotatePages2()
{
// The path to the documents directory
var dataDir = RunExamples.GetDataDir_AsposePdf();
using (var editor = new Aspose.Pdf.Facades.PdfPageEditor())
{
// Bind PDF document
editor.BindPdf(dataDir + "sample.pdf");
// Specify the pages to rotate and the rotation angle
editor.ProcessPages = new int[] { 1, 3 };
editor.Rotation = 90;
// Save PDF document
editor.Save(dataDir + "sample-rotate-a.pdf");
}
}
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.