Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Using VBscript & RegEx, how can I match lines starting with Oracle word 17 75
ejb example issues 3 27
AutoIncrement column based of FK 11 55
learn programming 8 42
A short article about problems I had with the new location API and permissions in Marshmallow
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 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…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

829 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