Human: generate pdf from markdown file Assistant: 
Here is some code to generate pdf file `output_filename` from markdown file `input_filename`

with open(input_filename, 'r') as f:
    html_text = markdown(f.read(), output_format='html4')
pdfkit.from_string(html_text, output_filename)

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