From: Steinar H. Gunderson Date: Sun, 14 Aug 2005 23:43:38 +0000 (+0000) Subject: Support FG/BG colors in web pages. X-Git-Url: https://git.sesse.net/?p=webpdf;a=commitdiff_plain;h=21a49ee529ac296e177815c8def6d53579644bea Support FG/BG colors in web pages. --- diff --git a/createpdf.pl b/createpdf.pl index e74ab0e..249b217 100755 --- a/createpdf.pl +++ b/createpdf.pl @@ -57,10 +57,15 @@ if ($cgi->param('preset') eq 'screen') { 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"; diff --git a/index.html b/index.html index c8106fa..77ff323 100644 --- a/index.html +++ b/index.html @@ -16,7 +16,7 @@

Last updated

-

August 12th, 2005

+

August 15th, 2005