if ($url =~ /^http/i) {
$outname = "web.pdf";
+ my @options = ("-f");
+
+ if (defined($cgi->param('color'))) {
+ push @options, "-c";
+ }
# Render through Gecko
$ENV{'DISPLAY'} = $pdfweb::config::xserver;
- system("gnome-web-print", "-f", $url, "$pdfweb::config::outputdir/$pdf_filename.ps");
+ system("gnome-web-print", @options, $url, "$pdfweb::config::outputdir/$pdf_filename.ps");
system("gs $pdfopts -dCompatbilityLevel=1.4 -dNOPAUSE -dPATCH -sDEVICE=pdfwrite -dSAFER -sOutputFile=output/$pdf_filename -c '.setpdfwrite $psopts' -f - < $pdfweb::config::outputdir/$pdf_filename.ps >&2");
} elsif ($filename =~ /(.*)\.(?:e?ps|pdf)$/i) {
$outname = "$1.pdf";
<div class="boxes">
<div class="info">
<h2>Last updated</h2>
- <p id="lastupdated">August 12th, 2005</p>
+ <p id="lastupdated">August 15th, 2005</p>
</div>
<div class="nav">
</select>
</td>
</tr>
+ <tr>
+ <td></td>
+ <td><input name="color" type="checkbox" /> Preserve FG/BG color in web pages</td>
+ </tr>
<tr>
<th colspan="2">
<input type="submit" value="Make PDF" />