public class ResizePageOptions extends Object
Constructor and Description |
---|
ResizePageOptions()
Constructs a default ResizePageOptions object.
|
Modifier and Type | Method and Description |
---|---|
Rectangle2D |
getMediaBox()
Returns the new media box for the PDFPage.
|
double |
getRotation()
Returns the amount to rotate the page contents in radians.
|
double |
getScale()
Returns scale to be applied to the page content.
|
double |
getXOffset()
Returns the x offset of the page contents.
|
double |
getYOffset()
Returns the y offset of the page contents.
|
boolean |
isAutoScale()
Returns the option to scale the page contents to fit inside the new media
box.
|
boolean |
isCenter()
Returns the option to center the page contents in the new media box.
|
boolean |
isFitToMedia()
Returns the fit to media option.
|
void |
setAutoScale(boolean autoScale)
Sets the option to scale the page contents to fit inside the new media
box.
|
void |
setCenter(boolean center)
Sets the option to center the page contents in the new media box.
|
void |
setFitToMedia(boolean fit)
If true then the page's crop box will be set equal to the page's media
box, otherwise the crop box will have the same margins as before
resizing.
|
void |
setMediaBox(Rectangle2D mediaBox)
Sets the new media box for the PDFPage.
|
void |
setRotation(double rotation)
Sets the amount to rotate the page contents in radians.
|
void |
setScale(double scale)
Sets the scale to be applied to the page content.
|
void |
setXOffset(double xOffset)
Sets the x offset of the page contents.
|
void |
setYOffset(double yOffset)
Sets the y offset of the page contents.
|
public ResizePageOptions()
public Rectangle2D getMediaBox()
public void setMediaBox(Rectangle2D mediaBox)
mediaBox
- The new media box. The dimensions are given in PostScript
points. 1 inch = 72 points, 1cm = 28.3465 points, 1mm = 2.8346 pointspublic boolean isCenter()
public void setCenter(boolean center)
center
- The center option.public boolean isAutoScale()
public void setAutoScale(boolean autoScale)
autoScale
- The scale optionpublic double getXOffset()
public void setXOffset(double xOffset)
xOffset
- The y offsetpublic double getYOffset()
public void setYOffset(double yOffset)
yOffset
- The y offsetpublic double getScale()
public void setScale(double scale)
scale
- The scale valuepublic double getRotation()
public void setRotation(double rotation)
rotation
- The rotation valuepublic void setFitToMedia(boolean fit)
fit
- The fit to media optionpublic boolean isFitToMedia()