public class PageResizer extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PageResizer.HorizontalAnchorPoint
Enum representing the horizontal anchor point used in the resizing and alignment
of a page or content.
|
static class |
PageResizer.ResizeType
Enum representing the available types of resizing strategies when modifying the dimensions
of a PDF page.
|
static class |
PageResizer.VerticalAnchorPoint
Represents the vertical alignment points used for resizing or aligning elements,
particularly in the context of page rescaling.
|
| Constructor and Description |
|---|
PageResizer(PageSize size,
PageResizer.ResizeType type)
Constructs a new PageResizer instance with the specified page size and resize type.
|
| Modifier and Type | Method and Description |
|---|---|
PageResizer.HorizontalAnchorPoint |
getHorizontalAnchorPoint()
Retrieves the horizontal anchor point of the PageResizer.
|
PageResizer.VerticalAnchorPoint |
getVerticalAnchorPoint()
Retrieves the vertical anchor point of the PageResizer.
|
void |
resize(PdfPage page)
Resizes a given PDF page based on the specified dimensions and resize type.
|
void |
setHorizontalAnchorPoint(PageResizer.HorizontalAnchorPoint anchorPoint)
Sets the horizontal anchor point, which determines how the horizontal alignment is handled
(e.g., LEFT, CENTER, RIGHT).
|
void |
setVerticalAnchorPoint(PageResizer.VerticalAnchorPoint anchorPoint)
Sets the vertical anchor point, which determines how the vertical alignment is handled
(e.g., TOP, CENTER, BOTTOM).
|
public PageResizer(PageSize size, PageResizer.ResizeType type)
size - the target page size to which the content should be resizedtype - the resizing method to be applied, such as maintaining the aspect ratiopublic PageResizer.HorizontalAnchorPoint getHorizontalAnchorPoint()
public void setHorizontalAnchorPoint(PageResizer.HorizontalAnchorPoint anchorPoint)
anchorPoint - the horizontal anchor point to set; it specifies the horizontal alignment type
for resizing operationspublic PageResizer.VerticalAnchorPoint getVerticalAnchorPoint()
public void setVerticalAnchorPoint(PageResizer.VerticalAnchorPoint anchorPoint)
anchorPoint - the vertical anchor point to set; it specifies the vertical alignment type
for resizing operationspublic void resize(PdfPage page)
page - the PDF page to be resizedCopyright © 1998–2025 Apryse Group NV. All rights reserved.