#include <libgnomeprint/gnome-print-job.h>
#include <zlib.h>
#include <string.h>
+#include <locale.h>
#include "xournal.h"
#include "xo-misc.h"
if (q!=p) {
if (*q == '.') {
obj->type = PDFTYPE_REAL;
- obj->realval = strtod(p, ptr);
+ obj->realval = g_ascii_strtod(p, ptr);
return obj;
}
if (ispdfspace(*q)) {
g_string_append_printf(str,
"%.2f %.2f %.2f rg 0 0 %.2f %.2f re f ",
RGBA_RGB(pg->bg->color_rgba), pg->width, pg->height);
+ if (!ui.print_ruling) return;
if (pg->bg->ruling == RULING_NONE) return;
g_string_append_printf(str,
"%.2f %.2f %.2f RG %.2f w ",
f = fopen(filename, "w");
if (f == NULL) return FALSE;
+ setlocale(LC_NUMERIC, "C");
annot = FALSE;
xref.data = NULL;
uses_pdf = FALSE;
g_free(xref.data);
if (annot) {
free_pdfobj(pdfinfo.trailerdict);
- // ...
+ if (pdfinfo.pages!=NULL)
+ for (i=0; i<pdfinfo.npages; i++) {
+ free_pdfobj(pdfinfo.pages[i].resources);
+ free_pdfobj(pdfinfo.pages[i].mediabox);
+ free_pdfobj(pdfinfo.pages[i].contents);
+ }
}
+ setlocale(LC_NUMERIC, "");
if (fwrite(pdfbuf->str, 1, pdfbuf->len, f) < pdfbuf->len) {
fclose(f);
g_string_free(pdfbuf, TRUE);
gnome_print_setrgbcolor(gpc, RGBA_RGB(pg->bg->color_rgba));
gnome_print_rect_filled(gpc, 0, 0, pg->width, pg->height);
+ if (!ui.print_ruling) return;
if (pg->bg->ruling == RULING_NONE) return;
gnome_print_setrgbcolor(gpc, RGBA_RGB(RULING_COLOR));
gnome_print_setlinewidth(gpc, RULING_THICKNESS);