Redirect to a text file. The client browser will then deal with it in
whatever way it has been configured to do so. If you want the user to do
something specific with it, as opposed to just reading it in the browser,
you'll have to give the user instructions as to what to do. We have this
situation with the download of student loans information from the Student
Loan Company (SLC), which are made available to us as text files posted to
the SLC's web server. Our users fetch the files using their browsers and
then save the file from the browser to an agreed location.
If you want to download to the client in the background, then you musn't.
It would be a huge security hole.
Peter