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
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