Implement wkthmltopdf.