use CommodsWeb;
my $printable= printable($m);
-if ($printable eq 'pdf' || $printable eq 'ps') {
+if ($printable =~ m/^pdf|^ps/) {
my $output;
my $got= $m->call_self(\$output);
if ($got) {
+ my @htargs= qw(htmldoc --continuous --gray --size 210x279mm
+ --left 1cm --right 1cm);
+ $printable =~ m/^[a-z]+/;
+ push @htargs, '-t',$&;
+ if ($printable =~ m/2$/) {
+ push @htargs, qw(--nup 2);
+ }
+ push @htargs, qw(-);
+
my $tmpfile= IO::File::new_tmpfile();
print $tmpfile $output or die $!;
$tmpfile->flush() or die $!;
eval {
$ENV{'HTMLDOC_NOCGI'}=1;
open STDIN, '<&', $tmpfile or die $!;
- exec qw(htmldoc -t),$printable,qw(
- --continuous --gray --size 210x279mm -);
+
+ exec @htargs;
die $!;
};
print STDERR "HTMLDOC FAILURE $@";
which contains mostly contributions from YARRG users and is not
covered by the AGPL.
-->
-
+<style type="text/css">
+ body { margin: 0; }
+ div.navoptbar { padding: 1em; background: #e0e0ff; }
+ address { background: #d7d8b3; padding: 1em; }
+ div.docs { padding: 1em; }
+ hr { display: none; }
+</style>
% $m->call_next();