471,350 Members | 2,049 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,350 software developers and data experts.

ContentType = "application/pdf"

Hi Folks ! :O)

In a web application, I'm trying to load a PDF document in the client's
browser.

The following code works on my workstation but fails on another one :
'***
With Response
.Buffer = True
.Clear()
.ClearContent()
.ClearHeaders()
.ContentType = "application/pdf"
fluxMemoirePDF.WriteTo(.OutputStream)
.Flush()
.Close()
End With
'***

The page doesn't change at all.
Now, if I comment this line out :
'***
.ContentType = "application/pdf"
'***

The page still doesn't change but the PDF document is opened in another
window...
I've searched a little into the registry and I found this key... which seems
to confirm that the content type "application/pdf" should be supported :
HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/pdf
- CLSID : {CA8A9780-280D-11CF-A24D-444553540000}
- Extension : .pdf
The given CLSID is pointing on the following DLL and exists on the disk :
C:\Program Files\Adobe\Acrobat 7.0\ActiveX\AcroPDF.dll

I also checked the security settings for the Internet zone in IE and it's
seems alright for ActiveX execution.

I'm working on Windows XP 2002 SP1 and VS.NET 1.1 SP1.

Thanks for reading me, any input would be much appreciated.

--
Best Regards
Yanick Lefebvre
Aug 8 '05 #1
1 3082
What version of Acrobat is installed on your client's machine? I worked on a
project doing this once and many of the problems that we had were attributed
to having varying versions of Adobe. Some behaved well, some did not.

When updating to solve this problem, my client had to uninstall the old
Adobe version and then install the newer version.

"Zoury" wrote:
Hi Folks ! :O)

In a web application, I'm trying to load a PDF document in the client's
browser.

The following code works on my workstation but fails on another one :
'***
With Response
.Buffer = True
.Clear()
.ClearContent()
.ClearHeaders()
.ContentType = "application/pdf"
fluxMemoirePDF.WriteTo(.OutputStream)
.Flush()
.Close()
End With
'***

The page doesn't change at all.
Now, if I comment this line out :
'***
.ContentType = "application/pdf"
'***

The page still doesn't change but the PDF document is opened in another
window...
I've searched a little into the registry and I found this key... which seems
to confirm that the content type "application/pdf" should be supported :
HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/pdf
- CLSID : {CA8A9780-280D-11CF-A24D-444553540000}
- Extension : .pdf
The given CLSID is pointing on the following DLL and exists on the disk :
C:\Program Files\Adobe\Acrobat 7.0\ActiveX\AcroPDF.dll

I also checked the security settings for the Internet zone in IE and it's
seems alright for ActiveX execution.

I'm working on Windows XP 2002 SP1 and VS.NET 1.1 SP1.

Thanks for reading me, any input would be much appreciated.

--
Best Regards
Yanick Lefebvre

Aug 8 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by rguarnieri | last post: by
4 posts views Thread by Bjorn Sagbakken | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.