Aha, the tip about deleting the old file and then triggering opening the new one was revealing. It looks like it's maybe re-writing the same pdf under a new name. It was getting the correct file path as I mentioned previously, but it looks like the content of the pdf was the problem. I could have sworn I checked that, but obviously I didn't. I'm guessing that I'm not clearing the html template properly or something. I'll start investigating there. Thanks for your help!