From a98cc6346eb258690b30ac19ceafcd9efba53cd9 Mon Sep 17 00:00:00 2001 From: stumpylog <797416+stumpylog@users.noreply.github.com> Date: Mon, 30 Sep 2024 09:41:02 -0700 Subject: [PATCH] Fixes orientation --- src/gotenberg_client/options.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gotenberg_client/options.py b/src/gotenberg_client/options.py index f514fa7..d9f01dc 100644 --- a/src/gotenberg_client/options.py +++ b/src/gotenberg_client/options.py @@ -55,6 +55,7 @@ def to_form(self) -> Dict[str, str]: DeprecationWarning, stacklevel=2, ) + return {} return {"pdfa": format_name} else: raise NotImplementedError(f"Unsupported PDF/A format: {self.value}") # noqa: EM102 @@ -78,12 +79,12 @@ def to_form(self) -> Dict[str, str]: and the corresponding Gotenberg value ("landscape" or "portrait") as the value. """ - orientation_mapping: Final[Dict[PageOrientation, str]] = { - PageOrientation.Landscape: "landscape", - PageOrientation.Portrait: "portrait", + orientation_mapping: Final[Dict[PageOrientation, Dict[str, str]]] = { + PageOrientation.Landscape: {"landscape": "true"}, + PageOrientation.Portrait: {"landscape": "false"}, } - return {"orientation": orientation_mapping[self]} + return orientation_mapping[self] @dataclasses.dataclass