This is a migrated thread and some comments may be shown as answers.

how to rotate individual pages

3 Answers 54 Views
PdfViewer and PdfViewerNavigator
This is a migrated thread and some comments may be shown as answers.
Moe
Top achievements
Rank 1
Veteran
Moe asked on 19 Aug 2019, 10:00 AM

Hi admin,

 

I want to rotate individual pages. Not radpdfviewer of rotation. I found individual page logic but exactly not correct . please see attach file.

 

 

Thanks

Moe

3 Answers, 1 is accepted

Sort by
0
Vladislav
Telerik team
answered on 21 Aug 2019, 03:24 PM
Hello Moe,

RadPdfViewer is intended for visualizing the documents and does not respect changes in its content, including the rotation of the pages, after importing the document. What is allowed to be edited are only the interactive forms inside the document. To accomplish the same goal, I can suggest you using PdfProcessing for the modifications. This approach involves rotating the chosen page (or pages) and then exporting and re-importing the document in order for the viewer to show the modified version. There is a post in the forums with some sample code that you can find helpful. Please, note that the forum topic concerns the PdfViewer control from the UI for WPF suite, but it should be pretty (if not absolutely) similar.

I hope this information helps. 
 
Regards,
Vladislav
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Moe
Top achievements
Rank 1
Veteran
answered on 26 Aug 2019, 01:49 AM

Hi Vladislav,

I am using winform form and vb.net.

Please can you provide to me for example code with vb using winform?

 

Thanks

Moe

0
Vladislav
Telerik team
answered on 28 Aug 2019, 09:58 AM

Hi Moe,

The idea of the procedure is the following:

  1. Load the PDF file
  2. Rotate the page(s) you want like this:
  3. document.Pages(PageNumber).Rotation = Rotation.Rotate90
  4. Export the document to a temporary stream
  5. Import the document from the stream

The code for the WinForms control shouldn't be different. I have prepared a sample project fro your reference. 

Please do not hesitate to ask if any additional questions arise.

Regards,

Vladislav

Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.


Tags
PdfViewer and PdfViewerNavigator
Asked by
Moe
Top achievements
Rank 1
Veteran
Answers by
Vladislav
Telerik team
Moe
Top achievements
Rank 1
Veteran
Share this question
or