 |
PdfResizeManager Class |
Resizes existing pdf documents — change the page size, orientation or margins, and scale / align
the original page content into the new page.
Inheritance HierarchySystemObject
SelectPdf.UniversalPdfResizeManager
Namespace: SelectPdf.UniversalAssembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.4
Syntaxpublic class PdfResizeManager
Public Class PdfResizeManager
The PdfResizeManager type exposes the following members.
Constructors
Properties| | Name | Description |
|---|
 | AllowScale | Whether the content may be scaled to fit. Default true. |
 | ContentSize | The size of the content in the resized page. |
 | HorizontalAlign |
Horizontal alignment of the content in the page — honored only when the content is placed at
the origin, scaling is allowed and the aspect ratio is preserved.
|
 | KeepAspectRatio | Whether the content aspect ratio is preserved when scaling. Default true. |
 | KeepOriginalPageSettings |
When true, each page keeps its original size and orientation instead of using
PageSize / PageOrientation, and the resized document keeps the
loaded document's security. Default false.
|
 | PageMargins | The resized document page margins. Default 0 on every side. |
 | PageOrientation | The resized document page orientation. Defaults to the loaded document's first-page orientation. |
 | PageSize | The resized document page size. Defaults to the loaded document's first-page size. |
  | Security |
Gets the security settings of the resized document - passwords, permissions and encryption.
|
 | StartPosition | The start position of the content in the resized page. |
 | VerticalAlign |
Vertical alignment of the content in the page — honored only when the content is placed at the
origin, scaling is allowed and the aspect ratio is preserved.
|
  | ViewerPreferences |
Gets the viewer preferences of the resized document.
|
Top
Methods
Remarks
Load a document, configure the geometry, then
Save(String) /
GetDocument.
Each source page is drawn scaled and aligned onto a new page. The resized document keeps what the
loaded document carries beyond its pages: annotations, links, form fields, bookmarks, named
destinations, the open action, page labels, attachments, document information, viewer preferences
and XMP metadata, with every page reference and coordinate remapped to the resized geometry.
ExamplePdfResizeManager manager = new PdfResizeManager();
manager.Load("a4.pdf");
manager.PageSize = PdfCustomPageSize.Letter;
manager.PageMargins = new PdfMargins(36);
manager.Save("letter.pdf");
manager.Close();Dim manager As New PdfResizeManager()
manager.Load("a4.pdf")
manager.PageSize = PdfCustomPageSize.Letter
manager.PageMargins = New PdfMargins(36)
manager.Save("letter.pdf")
manager.Close()
See Also