From 71c84038822aae6954f01a7804d5aa8cca8af7bb Mon Sep 17 00:00:00 2001 From: wl Date: Wed, 31 Jul 2013 20:19:56 +0000 Subject: Fix overprinting issue with Acrobat reader. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem reported by Heinz-Jürgen Oertel . * src/devices/gropdf/gropdf.pl (do_t, FindChar): Use ascii octal notation (i.e., \015) when outputting characters with value < 32. This fixes a bug which affected acroread when control-M (cr) was embedded in a text string. --- src/devices/gropdf/gropdf.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl index 078ebf23..92b37878 100644 --- a/src/devices/gropdf/gropdf.pl +++ b/src/devices/gropdf/gropdf.pl @@ -3068,7 +3068,7 @@ sub do_t $xpos+=($pendmv-$nomove)/$unitwidth; $stream.="% == '$par'=$wid 'xpos=$xpos\n" if $debug; - $par=~s/\\/\\\\/g; + $par=~s/\\(?!\d\d\d)/\\\\/g; $par=~s/\)/\\)/g; $par=~s/\(/\\(/g; @@ -3198,7 +3198,7 @@ sub FindChar my $ch=$fnt->{GNM}->{$chnm}; $ch=RemapChr($ch,$fnt,$chnm) if ($ch > 255); - return(chr($ch),$fnt->{WID}->[$ch]*$cftsz); + return(($ch<32)?sprintf("\\%03o",$ch):chr($ch),$fnt->{WID}->[$ch]*$cftsz); } else { -- cgit v1.2.1