create dockerfile for linux container that supports perl CGI and qt-patched wkhtmltopdf
Budget: $30 – $250 USD
We need a dockerfile for a container that does the following:
- uses any linux flavor
- supports wkhtmltopdf with patched qt (e.g. default installation on debian has qt issues)
- supports perl cgi calls
- uses any web server
- should support this call:
http://my_docker/wk_convert.cgi?infile=/tmp/infile.html&outfile=/tmp/outfile.pdf
wk_convert.cgi looks like this:
#!/usr/bin/perl
use CGI;
`wkhtmltopdf -nT 22mm param('infile') param('outfile')`;
print "Content-type: application/pdf; name=wk.pdf\n\n";
open(F,"<","/tmp/outfile.pdf") || print STDERR "cant < outfile.pdf $!";;
while(<F>) { print };
close F;
exit;
(edit the wkhtmltopdf path to whatever you need)
infile.html is located here:
https://www.scapefox.com/infile.html
download and store in /tmp/ in docker for testing purposes
output PDF should look exactly like this pdf:
https://www.scapefox.com/cgi-bin/wkconvert.cgi?infile=/tmp/infile.html&outfile=/tmp/outfile.pdf
- uses any linux flavor
- supports wkhtmltopdf with patched qt (e.g. default installation on debian has qt issues)
- supports perl cgi calls
- uses any web server
- should support this call:
http://my_docker/wk_convert.cgi?infile=/tmp/infile.html&outfile=/tmp/outfile.pdf
wk_convert.cgi looks like this:
#!/usr/bin/perl
use CGI;
`wkhtmltopdf -nT 22mm param('infile') param('outfile')`;
print "Content-type: application/pdf; name=wk.pdf\n\n";
open(F,"<","/tmp/outfile.pdf") || print STDERR "cant < outfile.pdf $!";;
while(<F>) { print };
close F;
exit;
(edit the wkhtmltopdf path to whatever you need)
infile.html is located here:
https://www.scapefox.com/infile.html
download and store in /tmp/ in docker for testing purposes
output PDF should look exactly like this pdf:
https://www.scapefox.com/cgi-bin/wkconvert.cgi?infile=/tmp/infile.html&outfile=/tmp/outfile.pdf