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).
How to Transform PDF Pages in C#
- Download all-in-one C# PDF Library to transform PDF pages
- Prepare the target PDF document
- Use the Transform method to move and scale the PDF pages
- Further edit the PDF, such as adding HTML or image stamps
- Export the PDF as a new file
Install with NuGet
Install-Package IronPdf
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