public class RenderPageToMaxImageSize extends ImageSectionMapping
Render a PDF page and scale it, thereby preserving the aspect ratio, to fit best on the target image size. The image size is specified in number of pixels.
For example, this mapping is suitable to create thumbnail images.
Constructor | Description |
---|---|
RenderPageToMaxImageSize(Size size) |
Modifier and Type | Method | Description |
---|---|---|
Size |
getSize() |
The maximum size of the image in pixels (Getter)
|
void |
setSize(Size value) |
The maximum size of the image in pixels (Setter)
|
equals, hashCode
public RenderPageToMaxImageSize(Size size)
size
- The maximum size of the image in pixels.java.lang.IllegalArgumentException
- The dimensions of size
are smaller than 1.java.lang.IllegalArgumentException
- if size
is null
public Size getSize()
Set or get the image size.
The dimensions of size
must be 1 or greater.
public void setSize(Size value)
Set or get the image size.
The dimensions of size
must be 1 or greater.
java.lang.IllegalArgumentException
- The dimensions of size
are smaller than 1.java.lang.IllegalArgumentException
- if value
is null