Bug 1031612 - In PDF Viewer, the buggy XMP title "Untitled" overrides the document info title

This commit is contained in:
sangm 2014-09-10 20:05:04 -05:00
parent c84a5695f0
commit f4ccb1b61c

View File

@ -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']) {