[Pkg-javascript-commits] [pdf.js] 67/204: Bug 1031612 - In PDF Viewer, the buggy XMP title "Untitled" overrides the document info title

David Prévot taffit at moszumanska.debian.org
Sat Oct 25 18:50:32 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository pdf.js.

commit f4ccb1b61c4e9f683be512f24cce188e44ff3878
Author: sangm <sang.mercado at gmail.com>
Date:   Wed Sep 10 20:05:04 2014 -0500

    Bug 1031612 - In PDF Viewer, the buggy XMP title "Untitled" overrides the document info title
---
 web/viewer.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/web/viewer.js b/web/viewer.js
index 7a76085..c9ab250 100644
--- a/web/viewer.js
+++ b/web/viewer.js
@@ -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']) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list