Replace the variables in html with strings. Don't forget to use the css while generating the pdf from the html.