mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
[api-minor] Change the "dc:creator" Metadata field to an Array
- add scripting support for doc.info.authors - doc.info.metadata is the raw string with xml code
This commit is contained in:
parent
35845d1bbb
commit
43d5512f5c
10 changed files with 97 additions and 33 deletions
|
@ -42,7 +42,7 @@ class Doc extends PDFObject {
|
|||
this._dirty = false;
|
||||
this._disclosed = false;
|
||||
this._media = undefined;
|
||||
this._metadata = data.metadata;
|
||||
this._metadata = data.metadata || "";
|
||||
this._noautocomplete = undefined;
|
||||
this._nocache = undefined;
|
||||
this._spellDictionaryOrder = [];
|
||||
|
@ -74,12 +74,13 @@ class Doc extends PDFObject {
|
|||
// and they're are read-only.
|
||||
this._info = new Proxy(
|
||||
{
|
||||
title: this.title,
|
||||
author: this.author,
|
||||
subject: this.subject,
|
||||
keywords: this.keywords,
|
||||
creator: this.creator,
|
||||
producer: this.producer,
|
||||
title: this._title,
|
||||
author: this._author,
|
||||
authors: data.authors || [this._author],
|
||||
subject: this._subject,
|
||||
keywords: this._keywords,
|
||||
creator: this._creator,
|
||||
producer: this._producer,
|
||||
creationdate: this._creationDate,
|
||||
moddate: this._modDate,
|
||||
trapped: data.Trapped || "Unknown",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue