Resizes existing pdf documents — change the page size, orientation or margins, and scale / align
the original page content into the new page.
Inheritance HierarchySystemObject
ExpertPdf.Anywhere.PDFResizePdfResizeManager
Namespace: ExpertPdf.Anywhere.PDFResizeAssembly: ExpertPdf.Anywhere (in ExpertPdf.Anywhere.dll) Version: 22.0
Syntaxpublic class PdfResizeManager : IDisposable
Public Class PdfResizeManager
Implements IDisposable
The PdfResizeManager type exposes the following members.
Constructors| | Name | Description |
|---|
 | PdfResizeManager |
Creates a resize manager. Load a document with one of the Load methods, set the new page settings and
save the result.
|
Top
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 = PageSize.Letter;
manager.PageMargins = new Margins(36);
manager.Save("letter.pdf");
manager.Close();Dim manager As New PdfResizeManager()
manager.Load("a4.pdf")
manager.PageSize = PageSize.Letter
manager.PageMargins = New Margins(36)
manager.Save("letter.pdf")
manager.Close()
See Also