How can a user change a PDF page order within radPdfViewer or radPdfViewerNavigator or another tool?
What would be the behindcode for it?
Thanks.
1 Answer, 1 is accepted
0
Dimitar
Telerik team
answered on 14 Apr 2023, 07:43 AM
Hi Adan,
To achieve this you should use the PdfProcessing library. With it, you can import the document and use the Pages collection to change the order. Here is an example:
var provider = new PdfFormatProvider();
var document = provider.Import(File.ReadAllBytes(@"..\..\..\lorem_large.pdf"));
var page = document.Pages.Last();
document.Pages.Remove(page);
document.Pages.Insert(0, page);
I hope this helps. Should you have any other questions do not hesitate to ask.