<human>: I need to create a pdf file, but I don't know how to do it.
<bot>: Here is some code to generate a PDF from HTML string `html_string` using the webkit2png library

pdf = weasyprint.HTML(html_string).convert('PDF')

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.