Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add an option to show filename on the tab instead of PDF title. #24

Open
FrostedVolcano opened this issue Dec 11, 2024 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers viewer This is specific to the PDF.js viewer

Comments

@FrostedVolcano
Copy link

In most cases of using PDFs people often change the file name of the PDF from their OS instead of changing the title using an app. As a result, the title is often "PowerPoint Presentation", because PDFs are often made from ppt slides.
Now if I open such a PDF and the title is shown on the tab instead of the filename, it becomes difficult to identify what file I opened and can cause many more confusions.

So, if possible please add an option to show the filename on the tab instead of title.

Thanks.

@shivaprsd
Copy link
Owner

@FrostedVolcano That is a really good point, thanks for suggesting it!

Currently the title of the tab is assigned by the PDF library (PDF.js). I will look in to how this can be configured.

@shivaprsd shivaprsd added enhancement New feature or request good first issue Good for newcomers viewer This is specific to the PDF.js viewer labels Dec 13, 2024
@shivaprsd
Copy link
Owner

shivaprsd commented Dec 13, 2024

@FrostedVolcano Can you attach one of the PDF files generated from PowerPoint that demonstrates the issue?

@FrostedVolcano
Copy link
Author

@shivaprsd sure, here's one:
Flow through pipes_1.pdf

If you open this with doqment, then on the tab it says "PowerPoint Presentation".

@shivaprsd
Copy link
Owner

@FrostedVolcano Thanks! I just realised that PDF.js already shows the filename after the title (and only the filename if title is absent). The only problem is that the filename may not be visible if the title is long.

E.g. when I open a new empty viewer in Brave (i.e. Chromium) and then drag and drop your file, the title and the file name are visible on hover:

brave.mov

Same with Firefox:

firefox

Only when you open it as a file:// URL on Chrome(ium), only the title is visible:

brave

This is actually since a recent update, doqment shows the viewer inside an iframe, and the title of the page is set by the browser and unmodified by PDF.js.

We could do two things here:

  • make the behaviour in the last case above similar to the other two cases
  • add the option to show only the file name even when a PDF title is present

@FrostedVolcano
Copy link
Author

@shivaprsd I also noticed that the file name is actually visible after the title. I forgot to mention that.
Anyways, thanks for caring about users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers viewer This is specific to the PDF.js viewer
Projects
None yet
Development

No branches or pull requests

2 participants