Transform PDF Pages in .NET

Transforming a PDF page typically involves applying various operations to change the appearance or layout of the content on that page. These transformations can include scaling (resizing the page) and translating (moving the content to a different position).


C# NuGet Library for PDF

Install with NuGet

Install-Package IronPdf
or
Java PDF JAR

Download DLL

Download DLL

Manually install into your project

Transform PDF Pages

Two transform features can move and resize the content. This only affects the appearance of the content displayed on the page and does NOT change the physical page dimensions. Let's try the Transform method on a basic PDF document.

:path=/static-assets/pdf/content-code-examples/how-to/transform-pdf-pages-transform-pdf.cs
using IronPdf;

PdfDocument pdf = PdfDocument.FromFile("basic.pdf");

pdf.Pages[0].Transform(50, 50, 0.8, 0.8);

pdf.SaveAs("transformPage.pdf");
IRON VB CONVERTER ERROR developers@ironsoftware.com
VB   C#
Transform PDF pages