|
iText 9.4.0 API
|
The PageResizer class provides functionality to resize PDF pages to a specified target page size using various resizing methods. More...
Public Types |
|
| enum | ResizeType { MAINTAIN_ASPECT_RATIO, DEFAULT } |
| Enum representing the available types of resizing strategies when modifying the dimensions of a PDF page. More... |
|
| enum | VerticalAnchorPoint { TOP, CENTER, BOTTOM } |
| Represents the vertical alignment points used for resizing or aligning elements, particularly in the context of page rescaling. More... |
|
| enum | HorizontalAnchorPoint { LEFT, CENTER, RIGHT } |
| Enum representing the horizontal anchor point used in the resizing and alignment of a page or content. More... |
|
Public Member Functions |
|
| PageResizer (PageSize size, PageResizer.ResizeType type) | |
| Constructs a new PageResizer instance with the specified page size and resize type. More... |
|
| virtual PageResizer.HorizontalAnchorPoint | GetHorizontalAnchorPoint () |
| Retrieves the horizontal anchor point of the PageResizer. More... |
|
| virtual void | SetHorizontalAnchorPoint (PageResizer.HorizontalAnchorPoint anchorPoint) |
| Sets the horizontal anchor point, which determines how the horizontal alignment is handled (e.g., LEFT, CENTER, RIGHT). More... |
|
| virtual PageResizer.VerticalAnchorPoint | GetVerticalAnchorPoint () |
| Retrieves the vertical anchor point of the PageResizer. More... |
|
| virtual void | SetVerticalAnchorPoint (PageResizer.VerticalAnchorPoint anchorPoint) |
| Sets the vertical anchor point, which determines how the vertical alignment is handled (e.g., TOP, CENTER, BOTTOM). More... |
|
| virtual void | Resize (PdfPage page) |
| Resizes a given PDF page based on the specified dimensions and resize type. More... |
|
The PageResizer class provides functionality to resize PDF pages to a specified target page size using various resizing methods.
The PageResizer class provides functionality to resize PDF pages to a specified target page size using various resizing methods. It adjusts page dimensions, content, annotations, and resources accordingly, also supports configuration options for maintaining the aspect ratio during the resize operation.
Enum representing the horizontal anchor point used in the resizing and alignment of a page or content.
Enum representing the horizontal anchor point used in the resizing and alignment of a page or content.
The horizontal anchor point specifies the horizontal alignment, determining the reference point for positioning during resizing operations. Possible values include:
|
strong |
Enum representing the available types of resizing strategies when modifying the dimensions of a PDF page.
Enum representing the available types of resizing strategies when modifying the dimensions of a PDF page. These strategies determine how the content is scaled relative to the new size.
|
strong |
Represents the vertical alignment points used for resizing or aligning elements, particularly in the context of page rescaling.
Represents the vertical alignment points used for resizing or aligning elements, particularly in the context of page rescaling.
The available anchor points are:
This enumeration is employed by the PageResizer class to determine the vertical alignment of content during resizing operations.
|
inline |
Constructs a new PageResizer instance with the specified page size and resize type.
| size | the target page size to which the content should be resized |
| type | the resizing method to be applied, such as maintaining the aspect ratio |
|
inlinevirtual |
Retrieves the horizontal anchor point of the PageResizer.
|
inlinevirtual |
Retrieves the vertical anchor point of the PageResizer.
|
inlinevirtual |
Resizes a given PDF page based on the specified dimensions and resize type.
Resizes a given PDF page based on the specified dimensions and resize type. Depending on the resize type, the aspect ratio may be maintained during scaling. Updates the page's content, annotations, and resources to reflect the new size.
| page | the PDF page to be resized |
|
inlinevirtual |
Sets the horizontal anchor point, which determines how the horizontal alignment is handled (e.g., LEFT, CENTER, RIGHT).
| anchorPoint | the horizontal anchor point to set; it specifies the horizontal alignment type for resizing operations |
|
inlinevirtual |
Sets the vertical anchor point, which determines how the vertical alignment is handled (e.g., TOP, CENTER, BOTTOM).
| anchorPoint | the vertical anchor point to set; it specifies the vertical alignment type for resizing operations |