diff --git a/.cvsignore b/.cvsignore index 239ca94..1978f12 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -gscan2pdf-0.9.10.tar.gz +gscan2pdf-0.9.12.tar.gz diff --git a/gscan2pdf-fix-paper-size.patch b/gscan2pdf-fix-paper-size.patch deleted file mode 100644 index 62070b6..0000000 --- a/gscan2pdf-fix-paper-size.patch +++ /dev/null @@ -1,123 +0,0 @@ ---- a/bin/gscan2pdf Wed Jun 13 08:13:10 2007 +0200 -+++ b/bin/gscan2pdf Wed Jun 13 13:21:59 2007 +0200 -@@ -453,7 +453,8 @@ Gtk2::Ex::Simple::List -> add_column_typ - $slist = Gtk2::Ex::Simple::List -> new('#' => 'int', - $d->get('Thumbnails') => 'pixbuf', - 'Filename' => 'hstring', -- 'Buffer' => 'hstring'); -+ 'Buffer' => 'hstring', -+ 'Resolution' => 'hstring'); - - # Callback for dropped signal. - $slist -> signal_connect('drag_drop' => sub { -@@ -1092,7 +1093,7 @@ sub convert_to_tiff { - - # Write the tif - $image->Write(units => 'PixelsPerInch', -- density => $density.'x'.$density, -+ density => $density, - filename => "$filename.tif"); - return "$filename.tif"; - } -@@ -1153,21 +1154,21 @@ sub import { - - # Import each image - my @images = ; -- import_scan($_, undef, 'Portable anymap', TRUE) foreach (@images); -+ import_scan($_, undef, 'Portable anymap', undef, TRUE) foreach (@images); - } - elsif ($format eq 'Tagged Image File Format') { - - # Split the tiff into its pages and import them individually - system("tiffsplit \"$filename\""); - my @pages = ; -- import_scan($_, undef, $format, TRUE) foreach (@pages); -+ import_scan($_, undef, $format, undef, TRUE) foreach (@pages); - } - elsif ($format =~ /(Portable anymap)|(Portable Network Graphics)|(Joint Photographic Experts Group JFIF format)|(CompuServe graphics interchange format)/) { - import_scan($filename, undef, $format); - } - else { - my $tiff = convert_to_tiff($filename); -- import_scan($tiff, undef, 'Tagged Image File Format', TRUE); -+ import_scan($tiff, undef, 'Tagged Image File Format', undef, TRUE); - } - - } -@@ -1497,7 +1498,8 @@ sub create_PDF { - # Get the size and resolution - my $w = $image->Get('width'); - my $h = $image->Get('height'); -- my $resolution = $image->Get('x-resolution'); -+ my $resolution = $slist -> {data}[$_][4]; -+ $resolution = $image->Get('x-resolution') if (! defined($resolution)); - - $page->mediabox($w*72/$resolution, $h*72/$resolution); - -@@ -2497,7 +2499,8 @@ sub scanimage { - - # If the scan can't be loaded then blow the scanning dialog away and - # show an error -- if (! import_scan ("out$1.pnm", $1*$step+$offset, 'Portable anymap', TRUE, $unpaper, $ocr)) { -+ if (! import_scan ("out$1.pnm", $1*$step+$offset, 'Portable anymap', -+ $SETTING{resolution}, TRUE, $unpaper, $ocr)) { - $dialog -> destroy; - $dialog = Gtk2::MessageDialog -> new ($windows, 'destroy-with-parent', - 'error', 'close', $d->get('Unable to load image')); -@@ -2641,7 +2644,8 @@ sub scanadf { - - # If the scan can't be loaded then blow the scanning dialog away and - # show an error -- if (! import_scan ("out$1.pnm", $1*$step+$offset, 'Portable anymap', TRUE, $unpaper, $ocr)) { -+ if (! import_scan ("out$1.pnm", $1*$step+$offset, 'Portable anymap', -+ $SETTING{resolution}, TRUE, $unpaper, $ocr)) { - $dialog -> destroy; - $dialog = Gtk2::MessageDialog -> new ($windows, 'destroy-with-parent', - 'error', 'close', $d->get('Unable to load image')); -@@ -2721,7 +2725,7 @@ sub hash2options { - # Take new scan and display it - - sub import_scan { -- my ($ofilename, $page, $format, $delete, $unpaper, $ocr) = @_; -+ my ($ofilename, $page, $format, $resolution, $delete, $unpaper, $ocr) = @_; - - my %suffix = ( - 'Portable Network Graphics' => '.png', -@@ -2744,8 +2748,9 @@ sub import_scan { - - # Block the row-changed signal whilst adding the scan (row) and sorting it. - $slist -> get_model -> signal_handler_block($slist -> {signalid}); -- push @{$slist -> {data}}, -- [$page, get_pixbuf($filename, $heightt, $widtht), $filename]; -+ push @{$slist -> {data}}, [ $page, -+ get_pixbuf($filename, $heightt, $widtht), -+ $filename, undef, $resolution ]; - manual_sort_by_column ($slist, 0); - $slist -> get_model -> signal_handler_unblock($slist -> {signalid}); - - ---- a/bin/gscan2pdf Wed Jun 13 13:21:59 2007 +0200 -+++ b/bin/gscan2pdf Thu Jun 14 06:56:42 2007 +0200 -@@ -1499,7 +1499,6 @@ sub create_PDF { - my $w = $image->Get('width'); - my $h = $image->Get('height'); - my $resolution = $slist -> {data}[$_][4]; -- $resolution = $image->Get('x-resolution') if (! defined($resolution)); - - $page->mediabox($w*72/$resolution, $h*72/$resolution); - -@@ -2734,6 +2733,13 @@ sub import_scan { - 'Portable anymap' => '.pnm', - 'CompuServe graphics interchange format' => '.gif', - ); -+ -+ if (! defined($resolution)) { -+ my $image = Image::Magick->new; -+ my $x = $image->Read($ofilename); -+ warn "$x" if "$x"; -+ $resolution = $image->Get('x-resolution') if (! defined($resolution)); -+ } - - my (undef, $filename) = tempfile(DIR => $dir, SUFFIX => $suffix{$format}); - if (defined($delete) and $delete) { - diff --git a/gscan2pdf.spec b/gscan2pdf.spec index 24eb412..db34335 100644 --- a/gscan2pdf.spec +++ b/gscan2pdf.spec @@ -1,13 +1,12 @@ Name: gscan2pdf -Version: 0.9.10 -Release: 2%{?dist} +Version: 0.9.12 +Release: 1%{?dist} Summary: A GUI for producing a multipage PDF from a scan Group: Applications/Publishing License: GPL URL: http://gscan2pdf.sourceforge.net Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz -Patch0: gscan2pdf-fix-paper-size.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -22,7 +21,6 @@ A GUI to ease the process of producing a multipage PDF from a scan. %prep %setup -q -%patch -p1 -b .fix-paper-size %build %{__perl} Makefile.PL INSTALLDIRS=vendor @@ -72,6 +70,9 @@ fi %{_mandir}/man1/*.1* %changelog +* Tue Jun 19 2007 Bernard Johnson - 0.9.12-1 +- v 0.9.12 + * Thu Jun 14 2007 Bernard Johnson - 0.9.10-2 - patch to fix paper size of output pdf file diff --git a/sources b/sources index f5fecf7..8386d48 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -11f704c81d2235726feb5f95571a21dc gscan2pdf-0.9.10.tar.gz +4e9fa229a2fd8c05738f00bfa58cf074 gscan2pdf-0.9.12.tar.gz