Class: QgsPageSizeRegistry

class qgis.core.QgsPageSizeRegistry

Bases: sip.wrapper

Creates a registry and populates it with known sizes

QgsPageSizeRegistry(QgsPageSizeRegistry)

A registry for known page sizes.

QgsPageSizeRegistry is not usually directly created, but rather accessed through QgsApplication.pageSizeRegistry()

New in version 3.0: Enums

Methods

add Adds a page size to the registry.
decodePageSize Decodes a string representing a preset page size.
entries Returns a list of page sizes in the registry.
find Finds matching page sizes from the registry, using a case insensitive match on the page size name.

Signals

Attributes

add(self, size: QgsPageSize)

Adds a page size to the registry.

decodePageSize(self, string: str, size: QgsPageSize) → bool

Decodes a string representing a preset page size. The decoded page size will be stored in the size argument.

Returns:True if string was successfully decoded
entries(self) → object

Returns a list of page sizes in the registry.

find(self, name: str) → List[QgsPageSize]

Finds matching page sizes from the registry, using a case insensitive match on the page size name.

find(self, size: QgsLayoutSize) -> str Finds a matching page size from the registry. Returns the page size name, or an empty string if no matching size could be found.

Orientation is ignored when matching page sizes, so a landscape A4 page will match to the portrait A4 size in the registry.