Skip to content

Bug 1031612 - In PDF Viewer, the buggy XMP title "Untitled" overrides th... #5287

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

Merged
merged 1 commit into from
Sep 11, 2014
Merged

Conversation

sangm
Copy link
Contributor

@sangm sangm commented Sep 11, 2014

...e document info title

Reordered to make sure if info['Title'] exists, assign pdfTitle to it.

if (metadata && metadata.has('dc:title')) {
pdfTitle = metadata.get('dc:title');
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still want metadata title be a preference

@yurydelendik
Copy link
Contributor

The idea at https://bugzilla.mozilla.org/show_bug.cgi?id=1031612#c4 is not implemented here.

@@ -1164,7 +1164,10 @@ var PDFView = {

var pdfTitle;
if (metadata && metadata.has('dc:title')) {
pdfTitle = metadata.get('dc:title');
var title = metadata.get('dc:title');
if (title !== 'Untitled') {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to make this check case insensitive, e.g. like this:

if (title.toLowerCase() !== 'untitled') {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (title.toLowerCase() !== 'untitled') {

I would disagree with checking a lower case equivalent, but I would certainly expect to see a comment with explanation why we are doing the comparison.

@yurydelendik
Copy link
Contributor

/botio-windows preview

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_preview from @yurydelendik received. Current queue size: 0

Live output at: http://107.22.172.223:8877/b3227f64a9bdebb/output.txt

yurydelendik added a commit that referenced this pull request Sep 11, 2014
Bug 1031612 - In PDF Viewer, the buggy XMP title "Untitled" overrides th...
@yurydelendik yurydelendik merged commit fd4134c into mozilla:master Sep 11, 2014
@yurydelendik
Copy link
Contributor

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants