There's no fix*. At that point, the user's browser has
decided the data-stream from your server is going to the
pdf file on its local disk. Just stop sending and close the
connection (this happens automatically if you fall of the
end of the script) and the download will complete.
Meanwhile, most browsers will still be displaying the page
from which the link for the pdf was selected, but if not
you're just gonna have to pray your users are smart
enough to push the Back button! :-)
*Otoh, you might be able to cook something up with
Javascript to display a second browser window...