[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:
Calixte Denizet 2021-01-08 18:40:09 +01:00
parent 35845d1bbb
commit 43d5512f5c
10 changed files with 97 additions and 33 deletions

View file

@ -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",