How can I get the title of a .pdf document as the page title?

I place the PDF on the website and provide a link to it, like any other file. If the browser is capable, it displays the PDF in a new tab. But the URL (and bulky) is displayed at the top of the tab where the document usually goes title. Do PDF files have an option for this that I can customize? Or is there a way to wrap a file in something that does?

(I tried checking the "title of the document to show" in the Acrobat options, but it does not.)

+3
source share
2 answers

I do not think that this is something that you can control inside the PDF itself. It is controlled by the web application serving the PDF file and your PDF browser plugin, which most likely just uses the PDF URL as <title>. The name of the downloaded PDF file can be specified in the web application by setting the content header in the HTTP response, but again this is not something you can control.

+5
source

The text displayed on the browser tab has nothing to do with the PDF file except the URL of the PDF file. This information that you see is controlled by the web page and browser. You cannot change it by making any changes to the PDF.

+2
source

Source: https://habr.com/ru/post/1525877/


All Articles