How to set the Chrome's PDFs view title?

Hi,

I have got this code:

<object data='Docs/PDFS/PDFs_103170940341.pdf' type='application/pdf' width='100%' height='100%'></object> 

On a Chrome’s browser it is rendered as show below. I wondering if there is a way to change the filename by a text thru the object tag.

I don’t know what you wish to do, but try reading this reference and see if it helps answer your question.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object

(FYI, my search string is “HTML object element”)

What I want to do is that instead of saying “PDFs_103170940341.pdf” to say something like “PDF edition 2018/01”.

I have also searched the HTML object element but haven’t found which parameter I should use to be able to change the toolbar’s title value.

Can you post a link to your test site?
OR post a “working page” - starts with <!doctype html>, includes the <head> section with CSS or links that work for us, the <body> section and relevant HTML code, and finally ends with </html>. Be sure to include any files or images that are called, especially foreground images whose width and height attributes are not included or do not reflect the actual dimensions of the images.

I’m not intimately familiar with SVGs so I need to see some working code to understand why the name of the .pdf file is showing in the black space at the top of the screenshot and how or if that might be changed.

1 Like

Just a thought, but if Chrome is displaying the file name, would it not be simpler just to rename the file to something more acceptable before uploading?

2 Likes

No, the text we would like to show might have spaces or accented caracters and besides my clientt would rather not display the file’s name all together.

My guess would be that you can’t and that Chrome simply displays the filename.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.