commit 64c71617fbea5090c217b79e8a4ea596dd9c93d2
parent 8f26e61e7aed7717512069957ec66876b4186c85
Author: nibo <nibo@relim.de>
Date: Wed, 25 Dec 2024 11:53:46 +0100
Reset global variables in out_pdf.c
In case of calling the function out_pdf_create() multiple
times, e.g. when using lorid as a library it's important
to reset the global variables otherwise the values
would persist to the next function call.
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/out_pdf.c b/out_pdf.c
@@ -2348,5 +2348,8 @@ out_pdf_create(
g_pdf_file = NULL;
objs_free(g_fonts);
g_fonts = NULL;
+ g_current_font_size = 0.0;
+ g_current_font_obj = NULL;
+ g_current_page_index = 0;
return pdf_filename;
}