My pdf file is open in browser tab. In the title of pdf tab instead of name it shows the url how can i changed it .I am using codeigniter framework and using Mpdf library for pdf.
Asked
Active
Viewed 3.0k times
10
-
Please add your PDF name and url in your question,and what change you required – Hardik Raval Dec 26 '14 at 05:58
-
My repitiions is low thats why i cant upload image. – Waqas Khan Dec 26 '14 at 06:18
-
Did not getting the issue, please provide more detail,your question is about pdf that not opening in browser. – Hardik Raval Dec 26 '14 at 13:10
-
@WaqasKhan clarify your question. – Raham Dec 30 '14 at 05:21
-
@RahamSher now check plz if u have any idea kindly share. – Waqas Khan Dec 30 '14 at 05:24
-
found a solution at this link https://stackoverflow.com/a/61047800/5723524 – Francesco Taioli Apr 06 '20 at 11:21
5 Answers
11
Your PDF document should have Title metadata set. Afterwards, browser will use it for rendering tab title.

Tigran Tokmajyan
- 1,937
- 7
- 25
- 36
-
But i open the pdf in browser. I am not downloading it. @Tigran Tokmajyan – Waqas Khan Dec 26 '14 at 05:14
-
1So you have PDF and you want to serve it through browser, right? To achieve title appearing in tab, you should edit the PDF and set the `title` metadata. – Tigran Tokmajyan Dec 26 '14 at 13:41
-
found a solution at this link https://stackoverflow.com/a/61047800/5723524 – Francesco Taioli Apr 06 '20 at 11:21
2
In Acrobat Pro, open the PDF and select File -> Properties -> Description and then edit the meta data title (and others if required) as you see fit.
We only saw the title being displayed like this in Firefox.

Chris Lewis
- 1,315
- 10
- 25
1
Put it in a div inside a page and change the page title like this:
<head>
<title>YOUR TAB TITLE</title>
</head>
and then:
<div>
<object data="test.pdf" type="application/pdf"
width="300" height="200">
alt : <a href="test.pdf">test.pdf</a>
</object>
</div>
You can also set the object width and height to match the page.

USER249
- 1,080
- 7
- 14
0
For changing PDF tab title in browser, you need to update "title" in property.
If you have PDF editor you can do it easily. Else it is not editable.
You can use any of the tool online to edit the title.
I did it using below link.

Suresh Kamrushi
- 15,627
- 13
- 75
- 90