Do you still need an answer?
When I stream reports I send a header that causes a view/save dialog to appear at the client. With PHP I do it as follows:
header("Content-disposition: attachment; filename="Filename.ext");
Send out whatever text, report, etc. Set the filename extension ".ext" to be whatever it should be for the type file.
ForASP.NET I do the following:
Response.ContentType = "application/x-pdf"
Response.AddHeader("content-disposition", "attachment; filename=OnCallReport.pdf")
In this case "bytes" contains the entire output stream and it happens to be a PDF being sent.
I'm working on a Classic ASP application right now that will stream out a PDF. I will do similar header statements, then send the whole constructed PDF file verbatim.
I definitely still need an answer - thanks for your help!
I don't have a problem streaming a PDF. I run into issues when trying
to stream the XFDF file. When I double click the XFDF on the server,
it behaves like I want. It launches acrobat and opens the PDF with the
data from the XFDF. So, I want to do the same thing through the
browser. The user will click a link to the XFDF file, which should
then launch acrobat and open the PDF.
Right now, it launches Acrobat, but acrobat complains of the error I
stated before. I'm so close I can taste it!
Thanks again for your perspective!
When you stream the PDF out, try changing the filename extension to .pdf and see what happens.
XFDF is a text format, you should not be streaming it as binary. You also need to set your charset header to UTF-8.