This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$sourceFile = "" # the source file containing the URLs you want to convert | |
$destFolder = "" # converted PDFs will be saved here. Folder has to exist. | |
$num = 1 | |
foreach($link in [System.IO.File]::ReadLines($sourceFile)) | |
{ | |
$outfile = $num.ToString() + '.pdf' | |
& 'C:\Program Files\Google\Chrome\Application\chrome.exe' --headless --print-to-pdf="$destFolder $outfile" "$link" | |
Start-Sleep -s 3 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment