How to Convert HTML to PDF With Source Code
- 1). Install a PDF printer driver. Many free PDF printer drivers are widely available, including "PDF 995," "PDF Creator" and "Free PDF Printer." These simple utilities make it possible to convert HTML source code to PDF.
- 2). Open the HTML file in any program you wish. You can view HTML in any word processing or text editing application, such as Windows Notepad, or in a web browser.
- 3). Click the print command in the program you use to view the HTML source code.
- 4). Select the PDF printer driver you previously installed from the list of printers. It is not necessary to adjust any other settings in this window.
- 5). Click the "OK" button to begin the printing. However, instead of an actual print-out, the PDF driver will convert the HTML source code into a PDF file. Depending on the PDF printer driver you installed, you may see an intermediate screen that prompts you for the name and file location of the PDF you are creating. Complete this step and press the "OK" button to complete the process.
Source...