SelectPdf for .NET - Pdf Resize/Scale Content - VB.NET / ASP.NET Sample This sample shows how to use SelectPdf Library for .NET to resize the pages of an existing PDF document, add margins, change page orientation. That can be done keeping the aspect ratio of the content or not, allowing scaling or not. The sample uses the following (existing) test PDF: Test PDF document The file has A4 pages, Portrait orientation, 5pt margins. Resize settings The new file will have the following settings: (Note: Margins bellow are added to the existing margins. Alignments are only taken into account if the scaling is allowed and the aspect ratio is preserved.) Pdf Page Size: A1 A2 A3 A4 A5 Letter HalfLetter Ledger Legal Pdf Page Orientation: Portrait Landscape Top Margin: pt Right Margin: pt Allow Scaling Bottom Margin: pt Left Margin: pt Keep Aspect Ratio Horizontal Alignment: Left Center Right Vertical Alignment: Top Middle Bottom