pdftools_sdk.image2_pdf.shrink_to_page

Classes

ShrinkToPage()

The image mapping that places the image onto pages of the specified size

class pdftools_sdk.image2_pdf.shrink_to_page.ShrinkToPage[source]

Bases: ImageMapping

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 size pdftools_sdk.image2_pdf.shrink_to_page.ShrinkToPage.page_size .

__init__()[source]
property page_size: Size

The page size

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)

Returns:

pdftools_sdk.geometry.units.size.Size

property page_margin: Margin

The page margin

Default value: 20mm (0.79in)

Returns:

pdftools_sdk.geometry.units.margin.Margin