diff --git a/foomatic-margins.patch b/foomatic-margins.patch new file mode 100644 index 0000000..ef16c03 --- /dev/null +++ b/foomatic-margins.patch @@ -0,0 +1,15 @@ +--- foomatic-db-engine-3.0-20070614/lib/Foomatic/DB.pm.margins 2007-06-14 11:42:16.000000000 +0100 ++++ foomatic-db-engine-3.0-20070614/lib/Foomatic/DB.pm 2007-06-14 11:43:13.000000000 +0100 +@@ -4289,9 +4289,10 @@ + sub getmargins { + my ($dat, $width, $height, $pagesize) = @_; + # Determine the unprintable margins +- # Zero margins when no margin info exists ++ # Safe margins when no margin info exists ++ my $border = 36; + my ($left, $right, $top, $bottom) = +- (0, $width, $height, 0); ++ ($border, $width - $border, $height - $border, $border); + # Margins from printer database entry + my ($pleft, $pright, $ptop, $pbottom) = + getmarginsformarginrecord($dat->{'printermargins'}, diff --git a/foomatic.spec b/foomatic.spec index 3c6c2ed..f622946 100644 --- a/foomatic.spec +++ b/foomatic.spec @@ -43,6 +43,9 @@ Patch15: foomatic-bad-utf8.patch # Missing IEEE 1284 IDs. Patch16: foomatic-ieee1284.patch +# Safe default margins for PPDs (bug #244161). +Patch17: foomatic-margins.patch + Url: http://www.linuxprinting.org BuildRequires: perl >= 3:5.8.1 BuildRequires: libxml2-devel @@ -96,6 +99,7 @@ chmod a+x mkinstalldirs %patch14 -p1 -b .ampathxml %patch10 -p1 -b .xml-cflags %patch15 -p1 +%patch17 -p1 -b .margins ./make_configure popd @@ -252,6 +256,7 @@ rm -fr %buildroot $RPM_BUILD_DIR/%{name} %changelog * Thu Jun 14 2007 Tim Waugh +- Safe default margins for PPDs (bug #244161). - Added missing IEEE 1284 ID for HP Photosmart 380 (bug #241352). * Thu Jun 14 2007 Tim Waugh 3.0.2-48