473,410 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,410 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 3300
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jerry O | last post by:
Hi , I have my asp successfully creating excel file viewable through IE using the header: Response.ContentType = "application/vnd.ms-excel" If the user does not have excel installed they...
4
by: jrasmussen | last post by:
I have created an Excel spreadsheet for the web. When it opens in IE 6.0 I get the message that the format is not supported. This is because it is in tab delimited format. Ane when I save the file,...
5
by: TJS | last post by:
trying to display pdf file in browser fails on this line: Response.ContentType = "application/pdf" getting an error about no declaration found for "response" what declaration is needed ???
2
by: CVerma | last post by:
I'm using an html input control (System.web.UI.HTMLControls.HTMLInputFile) to upload files such as msword, excel, jpg, and pdf. I have the encType property set in the form:...
5
by: David Lozzi | last post by:
Hello, this is a repost of a previous post of mine from today. I need to export multiple documents (doc, xls, ppt, jpg) and crystal reports to a single PDF file. I know how to export a single...
0
by: Microsoft NewsGroups | last post by:
I am creating a TAB delimited file with .XLS extention using the Response.ContentType = "application/ms-excel" method. Normally I would place this on it's own form and delete all the HTML in the...
2
by: steve02a | last post by:
I'm using the Response.ContentType = "application/vnd.ms-excel" in my web application to export data into a spreadsheet. That works fine and all. My question is: When I export the data and go...
0
by: ASP Developer | last post by:
For some reason when I direct my users to a word document via Response.ContentType = "application/word" the spell check is turned off. Does anyone know which smart tag needs to be mofied to have it...
1
by: rguarnieri | last post by:
Hi!, I'm using Visual Studio 6.0 and I'm trying to open an asp page like a .pdf file, I used Response.ContentType="application/pdf" in my asp page but it doesn't work This is an example: <%@...
4
by: Bjorn Sagbakken | last post by:
With ASP.NET 2.0 I'm trying to display the pdf file directly in the client browser, but I only get a download dialogue box. Downloading the file works fine, but I want to view the PDF directly. ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.