Issue with pdf load using response.binarywrite

C

csgraham74

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top