API Option Types¶
gotenberg_client.options.CookieJar
dataclass
¶
https://gotenberg.dev/docs/routes#cookies-chromium
gotenberg_client.options.PageMarginsType
dataclass
¶
Represents the margins for a page in Gotenberg.
Attributes:
Name | Type | Description |
---|---|---|
top | Optional[Measurement] | The top margin of the page. |
bottom | Optional[Measurement] | The bottom margin of the page. |
left | Optional[Measurement] | The left margin of the page. |
right | Optional[Measurement] | The right margin of the page. |
Functions¶
to_form() -> dict[str, str]
¶
Converts this PageMarginsType object to a dictionary suitable for form data.
Returns:
Type | Description |
---|---|
dict[str, str] | A dictionary containing key-value pairs for each margin property with their corresponding Gotenberg names |
dict[str, str] | (e.g., "marginTop", "marginBottom", etc.) and the formatted margin values as strings. |
gotenberg_client.options.PageOrientation
¶
gotenberg_client.options.PageSize
dataclass
¶
Represents the dimensions of a page in Gotenberg.
Attributes:
Name | Type | Description |
---|---|---|
width | Optional[Measurement] | The width of the page. |
height | Optional[Measurement] | The height of the page. |
gotenberg_client.options.MeasurementUnitType
¶
Represents the different units of measurement for sizes.
Attributes:
Name | Type | Description |
---|---|---|
Undefined | Indicates that no unit is specified. (Gotenberg will use inches ) | |
Points | Represents points (1/72 of an inch). | |
Pixels | Represents pixels. | |
Inches | Represents inches. | |
Millimeters | Represents millimeters. | |
Centimeters | Represents centimeters. | |
Percent | Represents a percentage relative to the page size. |