PDF Rotator

No downloads or installation required!

Rotate a PDF using our free online app or learn how it works with our embedded iText 7 Sandbox.

Use the free online PDF Rotator app

Click the box below to upload a PDF, or drag and drop a PDF into the box.

You can then choose the rotation direction and angle you want. If you have uploaded a PDF with multiple pages, you can choose if you want to rotate a specific page.

Click Rotate PDF and then download the resulting PDF.

Or play in the iText 7 Sandbox

In this Sandbox you can see how the the rotation code works in iText 7, and experiment with changing the code yourself.

Click Upload File and make sure the file name of the PDF you upload matches the name you specify in private static final String ORIG. Then click Execute to run your code. To remove an uploaded file, click the x displayed next to the file name.

You can click the switch at the top of the Sandbox to change between the embedded Java and C# compiler.

import com.itextpdf.kernel.pdf.PdfDocument; import com.itextpdf.kernel.pdf.PdfPage; import com.itextpdf.kernel.pdf.PdfReader; import com.itextpdf.kernel.pdf.PdfWriter; import java.io.IOException; public class PDFRotator { private static final String ORIG = "/uploads/rotate.pdf"; private static final String OUTPUT_FOLDER = "/myfiles/"; private static final int ROTATION_DEGREES = 90; public static void main(String[] args) throws IOException { PdfDocument pdfDocument = new PdfDocument(new PdfReader(ORIG), new PdfWriter(OUTPUT_FOLDER + "Rotated.pdf")); for (int p = 1; p <= pdfDocument.getNumberOfPages(); p++) { PdfPage page = pdfDocument.getPage(p); int rotate = page.getRotation(); if (rotate == 0) { page.setRotation(ROTATION_DEGREES); } else { page.setRotation((rotate + ROTATION_DEGREES) % 360); } } pdfDocument.close(); } }
using iText.Kernel.Pdf; namespace PDFRotator { public class PDFRotator { private static string ORIG = "/uploads/rotate.pdf"; private static string OUTPUT_FOLDER = "/myfiles/"; private static int ROTATION_DEGREES = 90; static void Main(string[] args) { PdfDocument pdfDocument = new PdfDocument(new PdfReader(ORIG), new PdfWriter(OUTPUT_FOLDER + "Rotated.pdf")); for (int p = 1; p <= pdfDocument.GetNumberOfPages(); p++) { PdfPage page = pdfDocument.GetPage(p); int rotate = page.GetRotation(); if (rotate == 0) { page.SetRotation(ROTATION_DEGREES); } else { page.SetRotation((rotate + ROTATION_DEGREES) % 360); } } pdfDocument.Close(); } } }

iText does not analyze the content of your uploaded or processed files. Users bear sole responsibility for the usage and content of their own files. All uploaded and processed files are deleted from our servers after users leave the page, or automatically after a period of 3 hours.


Haben Sie noch weitere Fragen? 

Gerne beantworten wir Ihre Fragen. Kontaktieren Sie uns und wir werden uns in Kürze mit Ihnen in Verbindung setzen.

Bitte kontaktieren Sie uns
Auf dem Laufenden bleiben

Melden Sie sich mit mehr als 11.000 Abonnenten an und werden Sie ein iText PDF-Experte, indem Sie sich über unsere neuen Produkte, Updates, Tipps, technischen Lösungen und Veranstaltungen informieren.

Abonniere jetzt