473,770 Members | 2,519 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ContentType = "applicatio n/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 = "applicatio n/pdf"
fluxMemoirePDF. WriteTo(.Output Stream)
.Flush()
.Close()
End With
'***

The page doesn't change at all.
Now, if I comment this line out :
'***
.ContentType = "applicatio n/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 "applicatio n/pdf" should be supported :
HKEY_CLASSES_RO OT\MIME\Databas e\Content Type\applicatio n/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\Acr obat 7.0\ActiveX\Acr oPDF.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 3377
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 = "applicatio n/pdf"
fluxMemoirePDF. WriteTo(.Output Stream)
.Flush()
.Close()
End With
'***

The page doesn't change at all.
Now, if I comment this line out :
'***
.ContentType = "applicatio n/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 "applicatio n/pdf" should be supported :
HKEY_CLASSES_RO OT\MIME\Databas e\Content Type\applicatio n/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\Acr obat 7.0\ActiveX\Acr oPDF.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
21175
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 get a IE pop up that downloads the asp page in question.
4
54847
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, It saves it as txt. How can this file be created so that Excel sees it as an .xls format. I created the data in VB 6.0 with a vbtab to seperate the columns. Hope this is enough information. Thanks for the help,
5
4974
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
15506
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: encType="multipart/form-data" <INPUT id="UploadFile" type="file" name="UploadFile" runat="server"> Private Sub btnUploadFile_Click(ByVal sender As System.Object, ByVal e
5
6481
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 Crystal Report to PDF and it works quite nicely using the Response.ContentType = "application/pdf". However, the users have an option to include other documents/reports in their report that are associated with the report. For example: User previews a...
0
5675
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 ASPX page - otherwise the aspx code gets appended to the end of the file out put to Excel. How do I produce the same output from a page where I cannot simply delete all the HTML code (must leave buttons and other objects intact)? In other words how...
2
15837
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 and view the spreadsheet - there are no grid lines. They all disappeared so it's like my data is on one giant white slab of nothing. I can read the data and see how each piece is in it's own cell - but no gridlines. Is there anything else I can...
0
1648
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 on by default. It appears as though it might be <w:SpellingState>Clean</w:SpellingState>. However, I haven't found any web sites that discusses what alternative values of this tag might will accept. Any help would be greatly appreciated.
1
450
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: <%@ Language=VBScript %> <%Response.ContentType="application/pdf"%>
4
61897
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. I get the same response with: Response.ContentType="Application/X-unknown" which is more understandable. The Response.ContentType="Application/pdf" doesn't seem to tell the browser
0
9592
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9425
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10230
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10058
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8886
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7416
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6678
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5313
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5450
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.