IRONSOFTWAREHOME

PDF Page Resize, Extend, and Transform

Curtis Chau
Curtis Chau
Updated: July 21, 2026

When you adjust PDF layout programmatically, the result depends on whether you change the page itself or the content inside it. IronPDF gives you three distinct methods for this: Resize, Extend, and Transform. Choosing the right one comes down to whether you want to change page size, add margins, or move content.

Resize

Use Resize when you want to change the page dimensions, enlarging or shrinking the page.

public void Resize(double PageWidth, double PageHeight, MeasurementUnit Units)
C#

Resize changes the physical size of the page and scales the content to fit the new dimensions, so everything stays visible. A page originally 210mm x 297mm resized to 148mm x 210mm becomes A5, with its content fitted into the smaller page.

Warning: Resizing scales content to fit. Watch for clipping when you shrink a page significantly.

Extend

Use Extend when you want whitespace or margins around existing content without touching the content's layout, scale, or position.

public void Extend(double ExtendLeft, double ExtendRight, double ExtendTop, double ExtendBottom, MeasurementUnit Units)
C#

This method adds space to the page, increasing its overall size, but leaves existing content exactly where it was. Starting from a 210mm x 297mm A4 page, adding 10mm left and right plus 20mm top and bottom yields a 230mm x 337mm page with the original content centered in its old space. It is handy for preparing a PDF for printing or binding where extra margins are needed.

Sample Input

Original A4 PDF page before extending margins

Sample Output

PDF page after Extend adds whitespace margins around unchanged content

Transform

Use Transform to move or scale the actual content on the page while keeping the physical page size fixed.

public void Transform(double MoveX, double MoveY, double ScaleX, double ScaleY)
C#

The page dimensions stay the same; only how the content appears changes. Passing values that move content right 10mm and down 5mm, then scale it to 80% in both directions, shifts and shrinks the content in place. Reach for this when correcting layouts, aligning content, or applying a zoom-out effect.

Sample Output

PDF page after Transform shifts and scales content within a fixed page size

Choosing Between Them

  • Resize: changes page size and scales content with it; mind potential clipping.
  • Extend: grows the canvas with whitespace and leaves content untouched.
  • Transform: moves or scales content while page dimensions stay fixed.

These methods also combine. A common pattern is resizing the page and then transforming the content to fit the new dimensions.

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 21,105,021Version:2026.9just released

Get your free 30-day Trial Key instantly.
No credit card or account creation required
C# NuGet Library for PDF
Install with NuGet

Version: 2026.9

PM > Install-Package IronPdf
nuget.org/packages/IronPdf/
  1. In Solution Explorer, right-click References, Manage NuGet Packages
  2. Select Browse and search "IronPdf"
  3. Select the package and install
C# PDF DLL
Download DLL

Version: 2026.9

or download Windows Installer here.

  1. Download and unzip IronPDF to a location such as ~/Libs within your Solution directory
  2. In Visual Studio Solution Explorer, right click References. Select Browse, "IronPdf.dll"

Licenses from $999

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

OR
bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried Iron Suite
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required
C# NuGet Library for PDF
Install with NuGet

Version: 2026.9

PM > Install-Package IronPdf
nuget.org/packages/IronPdf/
  1. In Solution Explorer, right-click References, Manage NuGet Packages
  2. Select Browse and search "IronPdf"
  3. Select the package and install
C# PDF DLL
Download DLL

Version: 2026.9

or download Windows Installer here.

  1. Download and unzip IronPDF to a location such as ~/Libs within your Solution directory
  2. In Visual Studio Solution Explorer, right click References. Select Browse, "IronPdf.dll"

Licenses from $999