Solved

Q about attaching pdf files that end up with an aspx extension

Posted on 2006-06-19
3
588 Views
Last Modified: 2007-12-19
Hello,

I have written an .net web application (1.1) that opens up a pdf file after a user clicks on a button.  The adobe reader version is 7.0.5.  When I click on the "Email" button, Novell Groupwise opens up and attaches the file automatically with a pdf extension.  On my machine it works fine, however, when our clients click on the "Email" button on the adobe reader, groupwise attaches the pdf file with an aspx extension.  Why is that and how can I fix that?  

Hopefully I was able to explain this adequatly.  If not, feel free to ask away and i'll try to explain better.

a million thanks in advance....

P.S.  the following link is where I got the pdf creator from.
http://report.sourceforge.net/
0
Comment
Question by:brdrok
3 Comments
 
LVL 11

Assisted Solution

by:pratap_r
pratap_r earned 250 total points
ID: 16935738
can you post the code where you write the PDF to the response stream? I think the content headers are not set properly.
0
 
LVL 26

Accepted Solution

by:
DireOrbAnt earned 250 total points
ID: 16937723
Hi,

You might not be using the same browser on both ends (IE, Firefox, others...).
In your Web app, try these two things:

1) In the actual URL that pops the PDF, ends it with .pdf so let's assume your link is like "mysite.com/app.aspx?GetFile=3" then make it "mysite.com/app.aspx?GetFile=3&Filename=file.pdf". Obviously, don't use a parameter name that you use in your application for "Filename=". This might help IE pick the extension.

2) Change the HTTP headers you pass back through that Web App (only change them when a PDF is sent back). I assume you are already passing a different "Content-Type:" header? "Content-Type: application/pdf"? You might also need to add a "Content-Disposition: attachment; filename=Whatever.pdf" header and maybe a "Content-Transfer-Encoding: binary" and "Content-Length: X" one. What headers are you passing back?

I hope #1 solves it for you. Provide us with more information on headers if it does not.
0
 
LVL 7

Author Comment

by:brdrok
ID: 17093478
Sorry, didn't mean to leave this Q hanging.  When you guys mentioned HTTP headers and content headers, it gave me an idea to look at "SmartNavigation".  Turns out, by setting this attribute to false, made the problem go away.

thank you.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
mapShare challenge 13 107
word0 challenge 3 91
firstChar challenge 13 115
Delphi: barcode reading on android platform 1 30
A short article about a problem I had getting the GPS LocationListener working.
A short article about problems I had with the new location API and permissions in Marshmallow
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question