summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2002-03-03 18:35:54 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2002-03-03 18:35:54 +0000
commit1554214e4157d6018d7201182111f0f16c8b8595 (patch)
tree205cc6b4c3eee113bb8aba2621026b078e7d4889 /perl-install
parentbc52586d98e8e7bdccd77a1ea7e43ecc28a53e36 (diff)
downloaddrakx-1554214e4157d6018d7201182111f0f16c8b8595.tar
drakx-1554214e4157d6018d7201182111f0f16c8b8595.tar.gz
drakx-1554214e4157d6018d7201182111f0f16c8b8595.tar.bz2
drakx-1554214e4157d6018d7201182111f0f16c8b8595.tar.xz
drakx-1554214e4157d6018d7201182111f0f16c8b8595.zip
Let Star Office/OpenOffice.org configuration corrcet a bug in the PostScript produced by these programs so that the Euro symbol is printed correctly.
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/printer.pm24
1 files changed, 22 insertions, 2 deletions
diff --git a/perl-install/printer.pm b/perl-install/printer.pm
index 404d06346..197e21183 100644
--- a/perl-install/printer.pm
+++ b/perl-install/printer.pm
@@ -1681,6 +1681,14 @@ sub configurestaroffice {
makestarofficeprinterentry($printer, $queue, $configprefix,
$configfilecontent);
}
+ # Patch PostScript output to print Euro symbol correctly also for
+ # the "Generic Printer"
+ $configfilecontent = removeentry
+ ("ports", "default_queue=", $configfilecontent);
+ $configfilecontent = addentry
+ ("ports",
+ "default_queue=/usr/bin/perl -p -e \"s=16#80 /euro=16#80 /Euro=\" | /usr/bin/lpr",
+ $configfilecontent);
# Write back Star Office configuration file
return writesofficeconfigfile($configfilename, $configfilecontent);
}
@@ -1738,6 +1746,14 @@ sub configureopenoffice {
makeopenofficeprinterentry($printer, $queue, $configprefix,
$configfilecontent);
}
+ # Patch PostScript output to print Euro symbol correctly also for
+ # the "Generic Printer"
+ $configfilecontent = removeentry
+ ("Generic Printer", "Command=", $configfilecontent);
+ $configfilecontent = addentry
+ ("Generic Printer",
+ "Command=/usr/bin/perl -p -e \"s=/euro /unused=/Euro /unused=\" | /usr/bin/lpr",
+ $configfilecontent);
# Write back OpenOffice.org configuration file
return writesofficeconfigfile($configfilename, $configfilecontent);
}
@@ -1912,9 +1928,11 @@ sub makestarofficeprinterentry {
"$queue=$queue PostScript,$queue",
$configfile);
# Make an entry in the "[ports]" section
+ # The "perl" command patches the PostScript output to print the Euro
+ # symbol correctly.
$configfile = removeentry("ports", "$queue=", $configfile);
$configfile = addentry("ports",
- "$queue=/usr/bin/lpr -P $queue",
+ "$queue=/usr/bin/perl -p -e \"s=16#80 /euro=16#80 /Euro=\" | /usr/bin/lpr -P $queue",
$configfile);
# Make printer's section
$configfile = addsection("$queue,PostScript,$queue", $configfile);
@@ -1977,9 +1995,11 @@ sub makeopenofficeprinterentry {
"PPD_PageSize=$papersize", $configfile);
}
# "Command" line
+ # The "perl" command patches the PostScript output to print the Euro
+ # symbol correctly.
$configfile = removeentry($queue, "Command=", $configfile);
$configfile = addentry($queue,
- "Command=/usr/bin/lpr -P $queue",
+ "Command=/usr/bin/perl -p -e \"s=/euro /unused=/Euro /unused=\" | /usr/bin/lpr -P $queue",
$configfile);
# "Comment" line
$configfile = removeentry($queue, "Comment=", $configfile);