Solved

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

Posted on 2006-06-19
3
590 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
[X]
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
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
split53 challenge 7 117
ejb example issues 3 52
Query group by data in SQL Server - cursor? 3 64
learn programming 8 66
This article will show, step by step, how to integrate R code into a R Sweave document
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
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…

740 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