473,397 Members | 2,099 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,397 software developers and data experts.

Issue with pdf load using response.binarywrite

Hi guys back again with another issue.

im trying to develop an application which displays a pdf document using
the binary.write method.

i have 2 pages A and B

what i want to do is to load my pdf document on the load event of page
B (ie it gives me the open or save option) and have page b loaded in
the browser with the pdf cancel save dialog box.

When the page B load_event code the pdf dialog opens correctly.

The problem is that the page B does not load up in the browser but the
app stops with page A in the browser. I think its to do with the
response.binarywrite or the response.end but im not sure. i need these
lines of code to get the document output.

Can anyone shed any light on this matter ??

Code Below:

iResult = opdf.OpenOutputFile("MEMORY")
iResult = opdf.CopyForm(0, 0)
iResult = opdf.CloseOutputFile()
img_PPRefGuide = opdf.BinaryImage
Response.AddHeader("content-disposition", "attachment; filename=PP
Reference Guide.pdf")
Response.ContentType = "application/pdf"
Response.BinaryWrite(img_PPRefGuide)
Response.End()
C

Nov 19 '05 #1
0 1563

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Bert Van Aerschot | last post by:
Hi all, I have to make a page with an inline frame, in this frame will come a dynamic generated PDF. The PDF will have to be stored on the server to load in the preview frame but after the user...
4
by: Nathan Henderson | last post by:
Hi, Becoming quite frustrated with this. I have a commercial database written in access and I'm trying to display some images, jpegs, stored in the DB on web page. My code is as follows: ...
7
by: Jim | last post by:
I am trying to display images that are stored in a database, and I am using a repeater control. What I still use the Response.BinaryWrite method with a binding expression, if so, what with the...
0
by: ambarishs | last post by:
Hi: We have a Flex Application hosted on IIS that uses .NET Web Services. Now the webserver is called "WebApp1". Under this site, have Webservices site called "Webservice1". Users log in using...
5
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, The following code was suggested by one of the users in this newsgroup when a pdf file was requested by a user from an asp page. I used the similar code in my page and the very interesting...
1
by: rascalking | last post by:
Hello, So I've read many forums that explained how to get an image out of SQL Server database and display it. I used an alternate .aspx page to retrieve the image and write it back as binary...
6
by: amollokhande1 | last post by:
Hi All, I am writting the the pdf data to the browser by using following code in vb.Net application Response.Clear() Response.ContentType =...
0
by: mraja1977 | last post by:
Hi All, I am writting/opening different types file data to the browser by using following code in c#. for all type of files there wont be any problem, but in case of html file, when i tries...
0
gchq
by: gchq | last post by:
Hi there VB.NET Web app Using a 'viewing page' I can pull a pdf file from the DB on the Development W/Station, but on the server it displays a blank page... As images are also stored in the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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,...
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
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,...
0
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...

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.