html-to-pdf.pl
perl html-to-pdf.pl https://www.perl.org/
This example takes an URL from the command line, renders it and and saves it as a PDF file in the current directory.
To install WWW::Mechanize::Chrome, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Mechanize::Chrome
CPAN shell
perl -MCPAN -e shell install WWW::Mechanize::Chrome
For more information on module installation, please visit the detailed CPAN module installation guide.