pkgsrc/print/html2ps/patches/patch-ab
2011-11-18 21:43:59 +00:00

39 lines
1.1 KiB
Text

$NetBSD: patch-ab,v 1.3 2011/11/18 21:44:00 ryoon Exp $
This patch adds option "-C H" to include headers (only) in output.
The patch was sent from the html2ps author Jan Karrman <jan@it.uu.se>
to hubertf@NetBSD.org upon request for such a feature. - HF
--- html2ps.orig 2005-02-25 13:40:42.000000000 +0000
+++ html2ps
@@ -521,7 +521,7 @@ $below=$opt_W=~/b/;
$layer=$opt_W=~/L/;
$prompt=$opt_W=~/p/;
-if($opt_C && $opt_C!~/^(b?[ft]|[ft]b?|b?h|hb?)$/)
+if($opt_C && $opt_C!~/^(b?[ft]|[ft]b?|b?[hH]|[hH]b?)$/)
{die "Invalid option: -C $opt_C\n"};
$tc=$opt_C?"t":"f";
$rev=$opt_C=~/t/;
@@ -2244,10 +2244,11 @@ if($gd) {
} else {
$sd="/Df f D\n";
}
+$ndox = $opt_C =~ /H/ ? 1 : $ndoc;
$_.=<<EOD;
[/Creator ($version) /Author ($Au) /Keywords ($kw) /Subject ($su)
/Title ($title) /DOCINFO pdfmark
-/ND $ndoc D
+/ND $ndox D
/HN [1 1 $nref\{pop (??)}for] D
$dh$hd
Hr length 0 gt{[/PageMode /UseOutlines /DOCVIEW pdfmark}if
@@ -3962,6 +3963,7 @@ sub DSC {
$mv=~s/\.0//g;
$temp.="$mv$line\n";
}
+ " "=~/( )( )( )/;
}
@nf=();
@sf=();