Click to See Complete Forum and Search --> : PDF Document Title in Browser


Tom_D
January 3rd, 2010, 02:19 AM
I'm not sure where this question might fit, so I'll try it here.

I'm loading a pdf file into a browser from a javascript function [x=window.open("myfile.pdf", etc)]. When the document loads, the title that appears at the top of the pdf page is the file name (ie) or name + path (firefox). What I would like to be able to do is change this title.

I tried the obvious javascript commands without success. I also tried in Adobe Acrobat Pro 9 to cause the document title rather than file name to appear - all without success.

Does anyone know if I can change the title of a pdf page as it appears in the browser - either through javascript or through tweaking the pdf in Acrobat?

PeejAvery
January 3rd, 2010, 03:24 PM
The browser handles the title based on what type of document it is loading. Since you are loading a PDF file straight up, the browser will give the file's path as the window title. You cannot change this in any way. That is just how the browser does it.

Your other option is to load the PDF into some embedded object which will display the PDF document.

Tom_D
January 3rd, 2010, 04:17 PM
Thanks for your feedback on this, PA.

After way too much googling, tinkering, and page-flipping, I'd pretty much come to this conclusion - but it is helpful to hear it straight up.

Pity, though, that the powers that be haven't made it easy to set the browser title in something so ubiquitous as a pdf file. Ah well, I will look at wrapping the pdf in some HTML.

Thanks Again.