Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change pdf tab title in browser

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.

like image 690
Waqas Khan Avatar asked Dec 26 '14 04:12

Waqas Khan


Video Answer


1 Answers

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.

Reference

like image 181
Amr Berag Avatar answered Oct 01 '22 11:10

Amr Berag