PDF Page VB.NET Library
How to rotate PDF page using VB.NET in Windows Forms, WPF, ASP.NET MVC apps
VB.NET Demo Code for PDF Document Page Rotation in Visual Basic .NET Class Application
In this vb.net tutorial, you will learn how to roate PDF pages using VB.NET code in WinForms, WPF, ASP.NET application.
- Rotate a PDF page or all pages
- Read, get an existing page rotation angle
- Easy to develop in Windows Forms, WPF applications, ASP.NET using VB.NET
- Complete C# guide for C#.NET developer: Rotate PDF pages using C#
How to rotate PDF pages using Visual Basic .NET
- Free VB.NET PDF SDK library for Visual Studio .NET
- Support .NET WinForms, ASP.NET MVC in IIS, ASP.NET Ajax, Azure cloud service, DNN (DotNetNuke), SharePoint
- Able to rotate PDF page and document in .NET WinForms application and ASP.NET project
- Rotate PDF page to 90,180,270 degree in both clockwise and anticlockwise in VB.NET
- Rotate single specified page or entire pages permanently in PDF file in Visual Basic .NET
- Batch change PDF page orientation in VB.NET program without adobe PDF reader control
- Support to overwrite PDF and save rotation changes to original PDF document
- Online source codes for integration in Visual Basic .NET class
- An outstanding component built in .NET framework 2.0 and compatible with Windows operating system
RasterEdge VB.NET PDF document page rotating control offers mature and professional APIs for developers to rotate source PDF page by 1 degree increments (either in a clockwise or counterclockwise way). Therefore, unlike other VB.NET PDF document page rotating controls on the market which can only support rotating PDF document page to 90 degrees, 180 degrees & 270 degrees, RasterEdge VB.NET PDF document page rotating control allows programmers to rotate PDF page at any desired angle.
asp.net itextsharp add image to pdf,
asp net mvc show pdf in div,
asp net replace text fro pdf free,
pdf editor in asp net mvc,
best pdf preview in asp net c#,
asp.net display pdf,
asp.net web image viewer.
Besides, this PDF document page rotator control SDK makes it possible for VB.NET programmers to save rotated PDF page to new file. So when users want to view the target PDF file next time, they do not need to rotate the PDF page again. Thus, RasterEdge PDF document page rotation library toolkit offers developers an efficient .NET solution to view source PDF document file.
How to rotate a PDF page in VB.NET code
Copy this VB demo code to your VB.NET application to rotate the first page of your PDF file to 180 degree in clockwise. And this demo will create a new PDF file.
Dim inputFilePath As String = "C:\1.pdf"
Dim outputFilePath As String = "C:\Output.pdf"
Dim pageIndex As Integer = 0
' Rotate 180 in clockwise
Dim rotateInDegree As Integer = 180
' rotate the first page
PDFDocument.RotatePage(inputFilePath, pageIndex, rotateInDegree, outputFilePath)
You may also rotate a page of your PDF file to 270 degree in clockwise. It's equal to rotate PDF page to 90 degree in anticlockwise. In addition, this demo will overwrite the original PDF file.
Dim inputFilePath As String = "C:\1.pdf"
Dim pageIndex As Integer = 0
' Rotate 270 in clockwise
Dim rotateInDegree As Integer = 270
' rotate the first page
PDFDocument.RotatePage(inputFilePath, pageIndex, rotateInDegree)
How to rotate all PDF pages using Visual Basic .NET
This VB.NET code is used for rotating all PDF pages to 180 in clockwise and output a new PDF file.
Dim inputFilePath As String = "C:\1.pdf"
Dim outputFilePath As String = "C:\Output.pdf"
' Rotate 180 in clockwise
Dim rotateInDegree As Integer = 180
' rotate all pages
PDFDocument.RotateAllPages(inputFilePath, rotateInDegree, outputFilePath)
This one is for rotating all PDF pages to 90 in clockwise and overwrite the original PDF file.
Dim inputFilePath As String = "C:\1.pdf"
' Rotate 90 in clockwise
Dim rotateInDegree As ItemAlignment = 90
' rotate all pages
PDFDocument.RotateAllPages(inputFilePath, rotateInDegree)
How to get an existing PDF page rotation angle using VB.NET
In VB.NET Code, use method BasePage.GetRotation() to get a PDF page rotation angle. The valid page rotation angles are 0, 90, 180, 270.
The vb.net source code below shows how to read and get an existing PDF page rotation angle.
Dim inputFilePath As String = "C:\1.pdf"
Dim doc1 As PDFDocument = New PDFDocument(inputFilePath)
' Get the first page object
Dim aPage As BasePage = doc1.GetPage(0)
Dim pageRotationAngle As Single = aPage.GetRotation()
Console.WriteLine("PDF page rotation angle: " + pageRotationAngle)