mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 23:28:06 +02:00
Bug 1031612 - In PDF Viewer, the buggy XMP title "Untitled" overrides the document info title
This commit is contained in:
parent
c84a5695f0
commit
f4ccb1b61c
1 changed files with 5 additions and 1 deletions
|
@ -1164,7 +1164,11 @@ var PDFView = {
|
|||
|
||||
var pdfTitle;
|
||||
if (metadata && metadata.has('dc:title')) {
|
||||
pdfTitle = metadata.get('dc:title');
|
||||
var title = metadata.get('dc:title');
|
||||
// Ghostscript sometimes return 'Untitled', sets the title to 'Untitled'
|
||||
if (title !== 'Untitled') {
|
||||
pdfTitle = title;
|
||||
}
|
||||
}
|
||||
|
||||
if (!pdfTitle && info && info['Title']) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue