Incorrect filename in Acrobat 6.0 when saving PDF from ASP

V

Vegard Bakke

This question includes both ASP (VBScript) and Adobe Acrobat/Reader
6.0. But I think the problem lies within Acrobat. If the ASP is
wrong, please tell me how to correct it.


Our web server controls access to pdf-documents with ASP pages. I use
the ADODB.Stream object to transfer the pdf (according to
http://support.microsoft.com/?id=276488), using
Response.AddHeader "Content-Disposition", "inline;
filename=test.pdf"
to indicate the filename. (Source listing below.)

IE recognises the filename as ‘test.pdf' (easy to test by swapping
‘inline' with ‘attachment'). However, Acrobat's "Save a Copy" insists
that the file is called ‘loadpdf.pdf'. And, "Email" – "Send Copy" does
not include the attachment at all.

For PDF's that are publicly available, directly through a URL, "Save a
Copy" and "Email" work as expected.

Why doesn't Acrobat suggest the filename 'test.pdf'? Is this a problem
in Acrobat? Or is my code incorrect? More importantly, is it possible
to solve, and how? Any suggestions are welcome.

Cheers,
Vegard

I am using IE 6.0 on WinXP and Adobe Acrobat 6.0.1. A short test
version of my ASP code follows:
Const adTypeBinary = 1
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Open
objStream.Type = adTypeBinary

objStream.LoadFromFile "test.pdf"

Response.Clear
Response.ContentType = "application/pdf"
Response.AddHeader "Content-Disposition", "inline;
filename=test.pdf"
Response.BinaryWrite objStream.Read
Response.End
objStream.Close
Set objStream = Nothing
 
G

Guest

Has anyone found a solution to this problem? It seems to be a problem
starting with Acrobat 6.0 because the Send Page By Email function works
properly in Acrobat 5.x with this same test. For some reason the Send
Email function in Acrobat 6.0.2 isn't recognizing the file name (nor
attaching any file) when you use "inline".
Using "attachment" is not a desirable option for me.

Thanks,
Jay
 
G

Guest

I'm having the exact same problem. It appears to be a bug in Acrobat
6.x since the 5.x reader can correctly email PDF files which are
streamed to the browser using "inline".
Has anyone found a solution (other than using "attachment")?

Jay
 

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

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top