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).

Quickstart: Transform PDF Pages Effortlessly

Learn how to easily transform PDF pages using the IronPDF library in .NET. With just a few lines of code, you can scale and translate page content without affecting the original page dimensions. This quick guide demonstrates how to apply these transformations to enhance your PDF documents seamlessly.

Nuget IconGet started making PDFs with NuGet now:

  1. Install IronPDF with NuGet Package Manager

    PM > Install-Package IronPdf

  2. Copy and run this code snippet.

    IronPdf.PdfDocument.FromFile("input.pdf")
      .Pages[0].Transform(50, 50, 0.8, 0.8)
      .SaveAs("output‑transformed.pdf");
  3. Deploy to test on your live environment

    Start using IronPDF in your project today with a free trial
    arrow pointer


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 example.

: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
$vbLabelText   $csharpLabel
  • Scalable Transformation: This part of the code scales down the PDF content to half its original size by setting the scale factors to 0.5 for both width and height dimensions.
  • Translation Transformation: The content of the PDF page is moved 100 units to the right and 200 units down, effectively repositioning it within the page.
  • Saving the Transformed PDF: After transformations are applied, the document is saved as a new file.
Transform PDF pages

Frequently Asked Questions

How do I transform PDF pages in C#?

To transform PDF pages in C#, download the IronPDF library from NuGet. Prepare your target PDF document, utilize the Transform method to apply scaling and translation, and save the modified document as a new file.

What does scaling a PDF page involve?

Scaling a PDF page involves resizing its content. For instance, you can use IronPDF to scale the content down to 50% of its original size using the Transform.Scale method.

How can I move content on a PDF page?

You can move content on a PDF page by using the translation feature in IronPDF. It allows you to shift content horizontally and vertically within the page without changing the page's physical dimensions.

Does transforming a PDF page alter its size?

No, transforming a PDF page with IronPDF only changes the appearance of the content, such as its position and scale, but does not alter the physical dimensions of the page itself.

Can I apply both scaling and translation to a PDF page simultaneously?

Yes, IronPDF allows you to apply both scaling and translation to the same PDF page, enabling you to adjust both the size and position of the content on the page.

What is the process to save a transformed PDF document?

After applying transformations using IronPDF, you can save the document as a new file, thus preserving the original while creating a modified version with the applied changes.

Where can I find examples of transforming PDF pages?

Examples of transforming PDF pages can be found in the IronPDF documentation and on their website, where detailed code snippets and instructions are provided.

Is it possible to add additional edits like HTML or image stamps after transforming a PDF page?

Yes, IronPDF allows you to further edit the PDF after transformation, such as adding HTML or image stamps, to enhance the document's content and appearance.

Curtis Chau
Technical Writer

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

...

Read More
Ready to Get Started?
Nuget Downloads 16,021,023 | Version: 2025.11 just released