Solved

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

Posted on 2006-06-19
3
586 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

744 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now