PDF: meilleure gestion d'erreur si police invalide
This commit is contained in:
parent
c5b2f89de8
commit
88b06f11d0
@ -320,9 +320,17 @@ class ScoDocPageTemplate(PageTemplate):
|
||||
|
||||
def draw_footer(self, canv, content):
|
||||
"""Print the footer"""
|
||||
canv.setFont(
|
||||
self.preferences["SCOLAR_FONT"], self.preferences["SCOLAR_FONT_SIZE_FOOT"]
|
||||
)
|
||||
try:
|
||||
canv.setFont(
|
||||
self.preferences["SCOLAR_FONT"],
|
||||
self.preferences["SCOLAR_FONT_SIZE_FOOT"],
|
||||
)
|
||||
except KeyError as exc:
|
||||
raise ScoValueError(
|
||||
f"""Police invalide dans pied de page pdf: {
|
||||
self.preferences['SCOLAR_FONT']
|
||||
} (taille {self.preferences['SCOLAR_FONT_SIZE_FOOT']})"""
|
||||
) from exc
|
||||
canv.drawString(
|
||||
self.preferences["pdf_footer_x"] * mm,
|
||||
self.preferences["pdf_footer_y"] * mm,
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- mode: python -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
SCOVERSION = "9.4.43"
|
||||
SCOVERSION = "9.4.44"
|
||||
|
||||
SCONAME = "ScoDoc"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user