Class Auto


public class Auto extends ImageMapping

The image mapping that automatically determines a suitable conversion

Images with a meaningful resolution, e.g. scans or graphics, are converted to PDF pages fitting the image. The image size is preserved if it is smaller than getMaxPageSize(). Otherwise, it is scaled down. For all images except scans, a margin getDefaultPageMargin() is used.

Images with no meaningful resolution, e.g. photos are scaled, to fit onto getMaxPageSize().

  • Constructor Details

    • Auto

      public Auto()
  • Method Details

    • getMaxPageSize

      public Size getMaxPageSize()

      The maximum page size (Getter)

      Each image is scaled individually such that neither the width nor the height exceeds the maximum page size. For landscape images the maximum page size is assumed to be landscape, and equivalently for portrait images.

      Default value: "A4" (210mm 297mm)

    • setMaxPageSize

      public void setMaxPageSize(Size value)

      The maximum page size (Setter)

      Each image is scaled individually such that neither the width nor the height exceeds the maximum page size. For landscape images the maximum page size is assumed to be landscape, and equivalently for portrait images.

      Default value: "A4" (210mm 297mm)

      Throws:
      IllegalArgumentException - The argument is smaller than "3pt 3pt" or larger than "14400pt 14400pt".
      IllegalArgumentException - if value is null
    • getDefaultPageMargin

      public Margin getDefaultPageMargin()

      The default page margin (Getter)

      Default value: 20mm (0.79in)
    • setDefaultPageMargin

      public void setDefaultPageMargin(Margin value)

      The default page margin (Setter)

      Default value: 20mm (0.79in)
      Throws:
      IllegalArgumentException - The argument has negative margin values.
      IllegalArgumentException - if value is null