In case we want to print a web page while keeping the original format of the page intact, we can use a free command line application, such as wkhtmltopdf.
Once the application has been installed, we can use the “Run DOS Command” Action in our code, in order to convert the web page to pdf, as follows:
Let’s say we want to capture Google's first page. In that case, the command would be:
- wkhtmltopdf http://google.com "C:\Users\UsernameGoesHere\Desktop\google.pdf"
The above Action will create a .pdf file named "google.pdf" on the user’s desktop.
*Note that the “Working Folder” may need to be adjusted depending on the installed directory of the application.