Can we plot PDF without saving every PDF?

I created the script to plod pdf using the following topic: