Package com.pdftools.image2pdf
Class ShrinkToPage
java.lang.Object
com.pdftools.internal.NativeBase
com.pdftools.internal.NativeObject
com.pdftools.image2pdf.ImageMapping
com.pdftools.image2pdf.ShrinkToPage
The image mapping that places the image onto pages of the specified size
Place images onto portrait or landscape pages. If an image is too large to fit on a page, the page may be rotated to better accommodate the image. Large images are scaled down to fit onto the PDF page sizegetPageSize().-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe page margin (Getter)The page size (Getter)voidsetPageMargin(Margin value) The page margin (Setter)voidsetPageSize(Size value) The page size (Setter)Methods inherited from class com.pdftools.internal.NativeObject
equals, hashCode
-
Constructor Details
-
ShrinkToPage
public ShrinkToPage()
-
-
Method Details
-
getPageSize
The page size (Getter)
All output pages are created with that size. The default page orientation is portrait, but if the image fits better, the page is rotated to landscape.
Default value: "A4" (210mm 297mm)
-
setPageSize
The page size (Setter)
All output pages are created with that size. The default page orientation is portrait, but if the image fits better, the page is rotated to landscape.
Default value: "A4" (210mm 297mm)
- Throws:
IllegalArgumentException- The argument is smaller than "3pt 3pt" or larger than "14400pt 14400pt".IllegalArgumentException- ifvalueisnull
-
getPageMargin
The page margin (Getter)
Default value: 20mm (0.79in) -
setPageMargin
The page margin (Setter)
Default value: 20mm (0.79in)- Throws:
IllegalArgumentException- The argument has negative margin values.IllegalArgumentException- ifvalueisnull
-