#! /bin/sh /usr/share/dpatch/dpatch-run ## 06_fix_pdf_xref.dpatch by ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Mark non-existent objects as free in the xref table. @DPATCH@ diff -urNad xsane-0.995~/src/xsane-multipage-project.c xsane-0.995/src/xsane-multipage-project.c --- xsane-0.995~/src/xsane-multipage-project.c 2007-05-17 14:57:31.000000000 +0200 +++ xsane-0.995/src/xsane-multipage-project.c 2008-09-17 21:54:28.871207862 +0200 @@ -973,6 +973,10 @@ else if (output_format == XSANE_PDF) { xsane_save_pdf_create_document_header(outfile, &xref, pages, preferences.save_pdf_flatedecoded); + + /* Objects 4 and 5 are unused and do not exist */ + xref.obj[4] = 0; + xref.obj[5] = 0; } } #ifdef HAVE_LIBTIFF #! /bin/sh /usr/share/dpatch/dpatch-run ## 07_fix_pdf_floats.dpatch by ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Set LC_NUMERIC to POSIX before printing floats when building ## DP: PostScript of PDF output. @DPATCH@ diff -urNad xsane-0.996~/src/xsane-save.c xsane-0.996/src/xsane-save.c --- xsane-0.996~/src/xsane-save.c 2008-09-20 22:48:29.000000000 +0200 +++ xsane-0.996/src/xsane-save.c 2009-06-26 11:46:52.599585386 +0200 @@ -26,6 +26,8 @@ #include "xsane-back-gtk.h" #include "xsane-front-gtk.h" #include "xsane-save.h" +#include +#include #include #include @@ -2411,6 +2413,7 @@ int flatedecode) { int depth; + char *save_locale; depth = image_info->depth; @@ -2428,8 +2431,15 @@ fprintf(outfile, "%d rotate\n", degree); fprintf(outfile, "%d %d translate\n", position_left, position_bottom); + + save_locale = strdup(setlocale(LC_NUMERIC, NULL)); + setlocale(LC_NUMERIC, "POSIX"); + fprintf(outfile, "%f %f scale\n", width, height); + setlocale(LC_NUMERIC, save_locale); + free(save_locale); + fprintf(outfile, "<<\n"); fprintf(outfile, " /ImageType 1\n"); fprintf(outfile, " /Width %d\n", image_info->image_width); @@ -3889,6 +3899,7 @@ int position_left, position_bottom, box_left, box_bottom, box_right, box_top, depth; int left, bottom; float rad; + char *save_locale; DBG(DBG_proc, "xsane_save_pdf_create_page_header\n"); @@ -4003,8 +4014,16 @@ fprintf(outfile, "q\n"); fprintf(outfile, "1 0 0 1 %d %d cm\n", position_left, position_bottom); /* translate */ + + save_locale = strdup(setlocale(LC_NUMERIC, NULL)); + setlocale(LC_NUMERIC, "POSIX"); + fprintf(outfile, "%f %f -%f %f 0 0 cm\n", cos(rad), sin(rad), sin(rad), cos(rad)); /* rotate */ fprintf(outfile, "%f 0 0 %f 0 0 cm\n", width, height); /* scale */ + + setlocale(LC_NUMERIC, save_locale); + free(save_locale); + fprintf(outfile, "BI\n"); fprintf(outfile, " /W %d\n", image_info->image_width); fprintf(outfile, " /H %d\n", image_info->image_height); #! /bin/sh /usr/share/dpatch/dpatch-run ## 09_cap_always_settable.dpatch by ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Remove check for SANE_CAP_ALWAYS_SETTABLE. The flag was never part of ## DP: the standard and has been removed upstream in SANE 1.0.20. @DPATCH@ diff -urNad xsane-0.996~/src/xsane-back-gtk.c xsane-0.996/src/xsane-back-gtk.c --- xsane-0.996~/src/xsane-back-gtk.c 2009-06-26 11:40:52.000000000 +0200 +++ xsane-0.996/src/xsane-back-gtk.c 2009-06-26 11:57:30.528586816 +0200 @@ -2612,10 +2612,7 @@ continue; } - if (!(opt->cap & SANE_CAP_ALWAYS_SETTABLE)) - { - gtk_widget_set_sensitive(xsane.element[i].widget, sensitive); - } + gtk_widget_set_sensitive(xsane.element[i].widget, sensitive); } if (xsane.xsanemode_widget)