Let's say we are printing the files via the above loop, this time to PDF printer. 2 issues appear:
1. we have to manually enter the filename for each output file
2. multiple windows will open up at the same time
How can we automatically assign the filenames for the output files?