@@ -80,7 +80,7 @@ public class PageResizer {
8080 * @param size the target page size to which the content should be resized
8181 * @param type the resizing method to be applied, such as maintaining the aspect ratio
8282 */
83- PageResizer (PageSize size , ResizeType type ) {
83+ public PageResizer (PageSize size , ResizeType type ) {
8484 this .size = size ;
8585 this .type = type ;
8686 }
@@ -181,6 +181,47 @@ public void resize(PdfPage page) {
181181 }
182182 }
183183
184+ /**
185+ * Enum representing the available types of resizing strategies when modifying the dimensions
186+ * of a PDF page. These strategies determine how the content is scaled relative to the new size.
187+ */
188+ public enum ResizeType {
189+ MAINTAIN_ASPECT_RATIO ,
190+ DEFAULT
191+ }
192+
193+ /**
194+ * Represents the vertical alignment points used for resizing or aligning elements,
195+ * particularly in the context of page rescaling.
196+ * <p>
197+ * The available anchor points are:
198+ * - TOP: The top edge of the element serves as the reference point for alignment.
199+ * - CENTER: The center of the element is used as the alignment reference.
200+ * - BOTTOM: The bottom edge of the element serves as the reference point for alignment.
201+ * <p>
202+ * This enumeration is employed by the PageResizer class to determine the vertical
203+ * alignment of content during resizing operations.
204+ */
205+ public enum VerticalAnchorPoint {
206+ TOP ,
207+ CENTER ,
208+ BOTTOM
209+ }
210+
211+ /**
212+ * Enum representing the horizontal anchor point used in the resizing and alignment
213+ * of a page or content.
214+ * <p>
215+ * The horizontal anchor point specifies the horizontal alignment,
216+ * determining the reference point for positioning during resizing operations.
217+ * Possible values include:
218+ * - LEFT*/
219+ public enum HorizontalAnchorPoint {
220+ LEFT ,
221+ CENTER ,
222+ RIGHT
223+ }
224+
184225 static String scaleDaString (String daString , double scale ) {
185226 if (daString == null || daString .trim ().isEmpty () || Math .abs (scale - 1.0 ) < EPSILON ) {
186227 return daString ;
@@ -682,47 +723,6 @@ private AffineTransform calculateAffineTransform(double horizontalScale, double
682723 return scalingMatrix ;
683724 }
684725
685- /**
686- * Enum representing the available types of resizing strategies when modifying the dimensions
687- * of a PDF page. These strategies determine how the content is scaled relative to the new size.
688- */
689- public enum ResizeType {
690- MAINTAIN_ASPECT_RATIO ,
691- DEFAULT
692- }
693-
694- /**
695- * Represents the vertical alignment points used for resizing or aligning elements,
696- * particularly in the context of page rescaling.
697- *
698- * The available anchor points are:
699- * - TOP: The top edge of the element serves as the reference point for alignment.
700- * - CENTER: The center of the element is used as the alignment reference.
701- * - BOTTOM: The bottom edge of the element serves as the reference point for alignment.
702- *
703- * This enumeration is employed by the PageResizer class to determine the vertical
704- * alignment of content during resizing operations.
705- */
706- public enum VerticalAnchorPoint {
707- TOP ,
708- CENTER ,
709- BOTTOM
710- }
711-
712- /**
713- * Enum representing the horizontal anchor point used in the resizing and alignment
714- * of a page or content.
715- *
716- * The horizontal anchor point specifies the horizontal alignment,
717- * determining the reference point for positioning during resizing operations.
718- * Possible values include:
719- * - LEFT*/
720- public enum HorizontalAnchorPoint {
721- LEFT ,
722- CENTER ,
723- RIGHT
724- }
725-
726726 /**
727727 * Represents the result of parsing a property in a scalable RC string. This class encapsulates
728728 * the starting and ending indices of the parsed value within the RC property string, along with
0 commit comments