This is a helper function for knitting Rmd. Due to technological limitation, the output cannot knit to PDF in Rmd directly (the problem is with the latex engine printing unicode character).
Therefore, to bypass this problem, you will first need to knit to html file first, then use this function to convert it to a PDF file.
if (FALSE) {
html_to_pdf(file_path = "html_name.html")
# all HTML files in the my_html_folder will be convertedhtml_to_pdf(dir = "Users/Desktop/my_html_folder")
}