Lines 1-5
Link Here
|
1 |
--- html2ps.orig 2010-05-07 20:22:12.000000000 +0900 |
1 |
--- html2ps.orig 2010-05-07 17:22:12.000000000 +0600 |
2 |
+++ html2ps 2013-04-29 00:07:16.000000000 +0900 |
2 |
+++ html2ps 2018-07-30 11:11:44.600980000 +0500 |
3 |
@@ -26,8 +26,9 @@ |
3 |
@@ -26,8 +26,9 @@ |
4 |
# Set the name of the global configuration file. See the installation notes |
4 |
# Set the name of the global configuration file. See the installation notes |
5 |
# and manual page for more details on configuration files. |
5 |
# and manual page for more details on configuration files. |
Lines 21-27
Link Here
|
21 |
height: ""; |
21 |
height: ""; |
22 |
width: ""; |
22 |
width: ""; |
23 |
} |
23 |
} |
24 |
@@ -613,6 +614,23 @@ |
24 |
@@ -356,6 +357,7 @@ |
|
|
25 |
|
26 |
eval "require POSIX"; |
27 |
$posix = !$@; |
28 |
+use File::Temp qw/ :POSIX /; |
29 |
|
30 |
%extend=('quote',1, 'font',1, 'colour',1, 'hyphenation',1); |
31 |
%fal=("serif","times", "sans_serif","helvetica", "monospace","courier"); |
32 |
@@ -495,7 +497,7 @@ |
33 |
if($opt_D && !$package{'Ghostscript'}); |
34 |
die "Ghostscript is required to generate cross references\n" |
35 |
if($opt_R && !$package{'Ghostscript'}); |
36 |
-$tmpname=$posix?POSIX::tmpnam():"h2p_$$"; |
37 |
+$tmpname=$posix?tmpnam():"h2p_$$"; |
38 |
($scr=$tmpname)=~/\w+$/; |
39 |
$tempdir=$`; |
40 |
|
41 |
@@ -613,6 +615,23 @@ |
25 |
$height{"b$_"}=int($temp*2**(1/2)*1000+.5)/10; |
42 |
$height{"b$_"}=int($temp*2**(1/2)*1000+.5)/10; |
26 |
} |
43 |
} |
27 |
if(!$pagew || !$pageh) { |
44 |
if(!$pagew || !$pageh) { |
Lines 45-51
Link Here
|
45 |
if($width{"\L$paper{'type'}"}) { |
62 |
if($width{"\L$paper{'type'}"}) { |
46 |
$paper{'width'}=$width{"\L$paper{'type'}"} if(!defined $paper{'width'}); |
63 |
$paper{'width'}=$width{"\L$paper{'type'}"} if(!defined $paper{'width'}); |
47 |
$paper{'height'}=$height{"\L$paper{'type'}"} if(!defined $paper{'height'}); |
64 |
$paper{'height'}=$height{"\L$paper{'type'}"} if(!defined $paper{'height'}); |
48 |
@@ -620,6 +638,7 @@ |
65 |
@@ -620,6 +639,7 @@ |
49 |
} elsif($paper{'type'}) { |
66 |
} elsif($paper{'type'}) { |
50 |
&dbg("Unknown paper type: $paper{'type'}\n"); |
67 |
&dbg("Unknown paper type: $paper{'type'}\n"); |
51 |
} |
68 |
} |
Lines 53-59
Link Here
|
53 |
} |
70 |
} |
54 |
if($opt_L) { |
71 |
if($opt_L) { |
55 |
$wl=$pageh-$mll-$mrl; |
72 |
$wl=$pageh-$mll-$mrl; |
56 |
@@ -3405,7 +3424,6 @@ |
73 |
@@ -3405,7 +3425,6 @@ |
57 |
local($optlist)=@_; |
74 |
local($optlist)=@_; |
58 |
local(@args,$_,$opt,$opts,$rest,$olist,$plist,$found,@popts); |
75 |
local(@args,$_,$opt,$opts,$rest,$olist,$plist,$found,@popts); |
59 |
local($errs)=0; |
76 |
local($errs)=0; |
Lines 61-63
Link Here
|
61 |
@args=split( /\|/, $optlist ); |
78 |
@args=split( /\|/, $optlist ); |
62 |
for $opt (@args) { |
79 |
for $opt (@args) { |
63 |
if(substr($opt,-1,1) ne ':') {$olist.=$opt} |
80 |
if(substr($opt,-1,1) ne ':') {$olist.=$opt} |
|
|
81 |
@@ -3830,7 +3849,7 @@ |
82 |
$temp=$'=~/\/P\d+_?\d* \{/?$`:$rest; |
83 |
($eps{$pid})=$temp=~/([\w\W]*)} D/; |
84 |
} |
85 |
- if(/\/DH {/) { |
86 |
+ if(/\/DH \{/) { |
87 |
$'=~/%EndDH/; |
88 |
$ph="/DH {$`"; |
89 |
} |
90 |
@@ -4081,7 +4100,7 @@ |
91 |
} |
92 |
if(open(HYPH,"<$hyfile")) { |
93 |
&dbg("Reading hyphenation patterns from $hyfile\n") if($opt_d); |
94 |
- <HYPH>=~/\\patterns{.*/; |
95 |
+ <HYPH>=~/\\patterns\{.*/; |
96 |
close HYPH; |
97 |
$def=$`; |
98 |
($patterns=$')=~s/\^\^($X$X)/chr hex $1/eg; |