summaryrefslogtreecommitdiff
path: root/print/html2ps/patches/patch-ab
blob: 14b4b1fe7665b50c89ac4c2e5543f2e8e5d5f8a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
$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=();