Class 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 Detail

      • RenderPageToMaxImageSize

        public RenderPageToMaxImageSize​(Size size)
        Parameters:
        size - The maximum size of the image in pixels.
        Throws:
        java.lang.IllegalArgumentException - The dimensions of size are smaller than 1.
        java.lang.IllegalArgumentException - if size is null
    • 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 of size are smaller than 1.
        java.lang.IllegalArgumentException - if value is null