deri pushed a commit to branch master
in repository groff.
commit 800b0197ea8b2dcaee5b22e890f5dbea22b8d250
Author: Deri James <[email protected]>
Date: Mon Dec 30 17:37:48 2019 +0000
Certain pdfmark destination names caused gropdf to fail.
* src/devices/gropdf/gropdf.pl: Look for pdfmark types, (i.e.
DEST, OUT, ANN), only preceding 'pdfmark' at end of line, not
anywhere else.
---
ChangeLog | 8 ++++++++
src/devices/gropdf/gropdf.pl | 10 +++++-----
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index baead25..b3946d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2019-12-30 Deri James <[email protected]>
+
+ Certain pdfmark destination names caused gropdf to fail.
+
+ * src/devices/gropdf/gropdf.pl: Look for pdfmark types, (i.e.
+ DEST, OUT, ANN), only preceding 'pdfmark' at end of line, not
+ anywhere else.
+
2019-12-30 Ingo Schwarze <[email protected]>
Correct output of sprintf("%%") in pic(1).
diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
index cfe5a93..6370ab5 100644
--- a/src/devices/gropdf/gropdf.pl
+++ b/src/devices/gropdf/gropdf.pl
@@ -842,7 +842,7 @@ sub do_x
$pdfmark=~s((\d{4,6}) u)(sprintf("%.1f",$1/$desc{sizescale}))eg;
$pdfmark=~s(\\\[u00(..)\])(chr(hex($1)))eg;
- if ($pdfmark=~m/(.+) \/DOCINFO/)
+ if ($pdfmark=~m/(.+) \/DOCINFO\s*$/)
{
my @xwds=split(' ',"<< $1 >>");
my $docinfo=ParsePDFValue(\@xwds);
@@ -852,7 +852,7 @@ sub do_x
$info{$k}=$docinfo->{$k} if $k ne 'Producer';
}
}
- elsif ($pdfmark=~m/(.+) \/DOCVIEW/)
+ elsif ($pdfmark=~m/(.+) \/DOCVIEW\s*$/)
{
my @xwds=split(' ',"<< $1 >>");
my $docview=ParsePDFValue(\@xwds);
@@ -862,7 +862,7 @@ sub do_x
$cat->{$k}=$docview->{$k} if !exists($cat->{$k});
}
}
- elsif ($pdfmark=~m/(.+) \/DEST/)
+ elsif ($pdfmark=~m/(.+) \/DEST\s*$/)
{
my @xwds=split(' ',"<< $1 >>");
my $dest=ParsePDFValue(\@xwds);
@@ -881,7 +881,7 @@ sub do_x
my $k=substr($dest->{Dest},1);
$dests->{$k}=$dest->{View};
}
- elsif ($pdfmark=~m/(.+) \/ANN/)
+ elsif ($pdfmark=~m/(.+) \/ANN\s*$/)
{
my $l=$1;
$l=~s/Color/C/;
@@ -896,7 +896,7 @@ sub do_x
FixPDFColour($annot->{DATA});
push(@PageAnnots,$annotno);
}
- elsif ($pdfmark=~m/(.+) \/OUT/)
+ elsif ($pdfmark=~m/(.+) \/OUT\s*$/)
{
my $t=$1;
$t=~s/\\\) /\\\\\) /g;
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit