PDF editor: Reduce precision size of empty page (Z#23112472) (#2935)

This commit is contained in:
Richard Schreiber
2022-12-01 13:19:21 +01:00
committed by GitHub
parent f72a0b4c09
commit 547cfdffd6

View File

@@ -156,8 +156,8 @@ class BaseEditorView(EventPermissionRequiredMixin, TemplateView):
p = PdfWriter() p = PdfWriter()
try: try:
p.add_blank_page( p.add_blank_page(
width=float(request.POST.get('width')) * mm, width=Decimal('%.5f' % (float(request.POST.get('width')) * mm)),
height=float(request.POST.get('height')) * mm, height=Decimal('%.5f' % (float(request.POST.get('height')) * mm)),
) )
except ValueError: except ValueError:
return JsonResponse({ return JsonResponse({