How to Convert Html to PDF

To transform an HTML page into a PDF file, the following steps must be adhered to for a seamless conversion process:

To begin, the Html file needs to be launched by double-clicking on it. This action will cause the file to open in the system's default web browser.

Next, we need to select the menu option situated in the top-right corner of the browser window.

Step 3 entails selecting the Print option from the dropdown menu.

Step 4: Next, we need to choose the 'Save as PDF' feature from the list of destinations, as illustrated in the screenshot below. Subsequently, proceed by clicking on the save button.

Step 5 involves the action of specifying both a name and a location for a PDF file after clicking.

Step 6: At this stage, the HTML page has been effectively transformed into a PDF format. To access the PDF, simply double-click on the file.

Input Required

This code uses input(). Please provide values below: