Merge pull request #5287 from sangm/bug1031612

Bug 1031612 - In PDF Viewer, the buggy XMP title "Untitled" overrides th...
This commit is contained in:
Yury Delendik 2014-09-11 14:17:26 -05:00
commit fd4134cf96

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