I
igarrison
I have an APP that reads from a file on disk and decrypts the raw data
into the memory stream that then gets passed to the client. This works
great for any text or image files, but I can't seem to get it working
at all for PDF files. I checked the stream, and the decrypted data is
written properly to the MemoryStream (I can dump the memory stream to
disk in the APP and open it fine), but I can't even get the Acrobat
activeX control to open in the browser window. The browser displays
the 'downloading from site' in the status bar while the data is
decrypted, then just sits there (not frozen) afterward, without
displaying any errors or any content.
I figured this had something to do with needing to set the MIME type,
which I tried several times, at different points in the process, but
that doesn't seem to do anything. If I try to hardcode a MIME type of
'application/pdf', everything still displays as it always does, leading
me to believe that I'm doing something wrong. (Shouldn't any file
typed as 'application/pdf' cause the Acrobat reader to open, then throw
an error when the reader see that it's not a valid pdf?) What am I
missing?
I can post my code if that will help. Any suggestions will be greatly
appreciated and probably save my head from a lot of banging against a
wall. Thanks.
into the memory stream that then gets passed to the client. This works
great for any text or image files, but I can't seem to get it working
at all for PDF files. I checked the stream, and the decrypted data is
written properly to the MemoryStream (I can dump the memory stream to
disk in the APP and open it fine), but I can't even get the Acrobat
activeX control to open in the browser window. The browser displays
the 'downloading from site' in the status bar while the data is
decrypted, then just sits there (not frozen) afterward, without
displaying any errors or any content.
I figured this had something to do with needing to set the MIME type,
which I tried several times, at different points in the process, but
that doesn't seem to do anything. If I try to hardcode a MIME type of
'application/pdf', everything still displays as it always does, leading
me to believe that I'm doing something wrong. (Shouldn't any file
typed as 'application/pdf' cause the Acrobat reader to open, then throw
an error when the reader see that it's not a valid pdf?) What am I
missing?
I can post my code if that will help. Any suggestions will be greatly
appreciated and probably save my head from a lot of banging against a
wall. Thanks.