X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2Fxo-print.c;h=2050f85badb4d983ba20b025577935e09f42a066;hb=3d2aca5e4781cf52291afc063e37b65f61638df8;hp=04493c9c010d59f3c4e79ae72173ec3154f557dd;hpb=59df9eb838b273295a6b86ce9f522dc4ad71dc4d;p=xournal.git diff --git a/src/xo-print.c b/src/xo-print.c index 04493c9..2050f85 100644 --- a/src/xo-print.c +++ b/src/xo-print.c @@ -7,6 +7,7 @@ #include #include #include +#include #include "xournal.h" #include "xo-misc.h" @@ -182,7 +183,7 @@ struct PdfObj *parse_pdf_object(char **ptr, char *eof) 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)) { @@ -820,6 +821,7 @@ gboolean print_to_pdf(char *filename) f = fopen(filename, "w"); if (f == NULL) return FALSE; + setlocale(LC_NUMERIC, "C"); annot = FALSE; xref.data = NULL; uses_pdf = FALSE; @@ -992,9 +994,15 @@ gboolean print_to_pdf(char *filename) g_free(xref.data); if (annot) { free_pdfobj(pdfinfo.trailerdict); - // ... + if (pdfinfo.pages!=NULL) + for (i=0; istr, 1, pdfbuf->len, f) < pdfbuf->len) { fclose(f); g_string_free(pdfbuf, TRUE);