3

This is not a back-end programming question. I can only modify the markup or script (or the document itself). The reason I'm asking here is because all my searches for appropriate terms inevitably lead to questions and solutions about programming this functionality. I'm not trying to force it via progrmaming; I have to find out why this PDF is behaving differently.

So: I have a bunch of links to PDFs on a page. Most of them open in new tabs, but one of them, the most recent, starts to open in a tab, but then the tab closes and the PDF gets downloaded as a file instead. All markup is consistent - there's nothing differnt about the odd-man-out except the actual URL.

You can see this here: http://calwater.mwnewsroom.com/Investor-Relations/Financial-Reports/Annual-Reports

All annual reports up to 2012 open in a new tab, but 2013 downloads instead.

This leads me to believe that there is some meta-data property of the PDF itself that tells it how to open, and that, in this case, the 2013 PDF was created using different settings.

Apparently, the PDF was saved out to PDF from InDesign.

Does anyone have any insight?

DaveC426913
  • 2,012
  • 6
  • 35
  • 63
  • 1
    I believe it is the Content-Disposition part of the request header that you need to look at. Make sure that it's not set to attachment. – CameronP May 28 '14 at 18:54
  • I've come across that, yes. But the PDF was not generated programmatically. How would I change the header? I'm supposing in the original creation software, which is InDesign? – DaveC426913 May 28 '14 at 18:56
  • I think it's definitely a browser problem. I tried Chrome and Firefox and it does as you say, but IE will open it in a new tab. Take a look at this article and see if it helps: http://helpx.adobe.com/acrobat/using/display-pdf-browser-acrobat-xi.html. – CameronP May 28 '14 at 21:00
  • Does this answer your question? [How do I force files to open in the browser instead of downloading (PDF)?](https://stackoverflow.com/questions/6293893/how-do-i-force-files-to-open-in-the-browser-instead-of-downloading-pdf) – Cornelius Roemer Apr 09 '21 at 13:45

1 Answers1

0

Problem solved. There was simply an error in the string (like an extra period) that references the attachment such that it couldn't tell it was a PDF. Fixing the reference fixed the problem.

DaveC426913
  • 2,012
  • 6
  • 35
  • 63