Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Batch printing IE pages to PDF

$
0
0

I'm stuck with an old application that only works with IE. I need to save all reports in PDF format where only one part is changing 'ID", rest of the path is always the same.

I'm looking into ways of getting this scripted under Windows

1. Get a list of all available ID's. I have this part.

2. Substitute an ID from above for each of the pages:

https://example.com/cgi/view.dbw?ID=123456&CustomReport=true

3. Open page in IE, print to a file where default printer is PDF, save file as %ID%.pdf, exit.

4. Go to next ID, Print page as PDF, Exit.

Any pointers to how to get this done? I'm thinking about the PowerShell as it should have the most options :)


Viewing all articles
Browse latest Browse all 15370

Trending Articles