Package com.pdftools.pdf2image
Class RenderPageToMaxImageSize
- java.lang.Object
-
- com.pdftools.internal.NativeBase
-
- com.pdftools.internal.NativeObject
-
- com.pdftools.pdf2image.ImageSectionMapping
-
- com.pdftools.pdf2image.RenderPageToMaxImageSize
-
public class RenderPageToMaxImageSize extends ImageSectionMapping
The image section mapping to render entire pages using a specific image pixel size
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 Summary
Constructors Constructor Description RenderPageToMaxImageSize(Size size)
-
Method Summary
All Methods Instance Methods Concrete Methods 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)-
Methods inherited from class com.pdftools.internal.NativeObject
equals, hashCode
-
-
-
-
Constructor Detail
-
RenderPageToMaxImageSize
public RenderPageToMaxImageSize(Size size)
- Parameters:
size
- The maximum size of the image in pixels.- Throws:
java.lang.IllegalArgumentException
- The dimensions ofsize
are smaller than 1.java.lang.IllegalArgumentException
- ifsize
isnull
-
-
Method Detail
-
getSize
public Size getSize()
The maximum size of the image in pixels (Getter)
Set or get the image size.
The dimensions of
size
must be 1 or greater.
-
setSize
public void setSize(Size value)
The maximum size of the image in pixels (Setter)
Set or get the image size.
The dimensions of
size
must be 1 or greater.- Throws:
java.lang.IllegalArgumentException
- The dimensions ofsize
are smaller than 1.java.lang.IllegalArgumentException
- ifvalue
isnull
-
-