PC Review


Reply
Thread Tools Rate Thread

ContentType = "application/pdf"

 
 
Zoury
Guest
Posts: n/a
 
      8th Aug 2005
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


 
Reply With Quote
 
 
 
 
=?Utf-8?B?SmVmZiBGdWxjZXI=?=
Guest
Posts: n/a
 
      8th Aug 2005
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
>
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Spell check is lost when using ContentType = "application/word" =?Utf-8?B?QVNQIERldmVsb3Blcg==?= Microsoft ASP .NET 0 28th Dec 2005 12:46 AM
Response.ContentType = "application/vnd.ms-excel" Help Please... =?Utf-8?B?c3RldmUwMmE=?= Microsoft Dot NET 2 22nd Nov 2005 08:19 PM
Stream documents to Response.ContentType="application/pdf" David Lozzi Microsoft ASP .NET 5 14th Jan 2005 09:17 PM
PostedFile.ContentType returns "application/octet-stream" instead of "application/vnd.ms-excel" CVerma Microsoft ASP .NET 2 28th Sep 2004 12:01 AM
error "declaration expected" for (Response.ContentType = "application/pdf") TJS Microsoft ASP .NET 5 19th Nov 2003 12:25 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:26 PM.