From 9972ac6548a80dbe095fe52057ec7c42745f4687 Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Wed, 2 Mar 2022 15:29:48 +0100 Subject: [PATCH] Make sure to calculate with float objects. --- server/annotate_pypdf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/annotate_pypdf.py b/server/annotate_pypdf.py index bc4e5e4..cff0c54 100644 --- a/server/annotate_pypdf.py +++ b/server/annotate_pypdf.py @@ -66,7 +66,7 @@ def annotate(fp_in, annotations): y = annotation['y'] if angle == 0: x = float(x) - y = size[3] - float(y) - 20 + y = float(size[3]) - float(y) - 20 elif angle == 90: x, y = float(y) - 2, float(x) - 15 else: