|
|
DescriptionMake Document's 'info' property readonly
As per the PDF specification in [1], page 103, the
'info' property of the Document object is readonly.
[1] http://partners.adobe.com/public/developer/en/acrobat/sdk/5186AcroJS.pdf
Committed: https://pdfium.googlesource.com/pdfium/+/ec2687680b0d033c3634e8dd0f8d8586c13494f6
Patch Set 1 #
Messages
Total messages: 14 (4 generated)
Description was changed from ========== Make Document's 'info' property readonly As per the PDF specification in [1], page 103, the 'info' property of the Document object is readonly. [1] http://partners.adobe.com/public/developer/en/acrobat/sdk/5186AcroJS.pdf ========== to ========== Make Document's 'info' property readonly As per the PDF specification in [1], page 103, the 'info' property of the Document object is readonly. [1] http://partners.adobe.com/public/developer/en/acrobat/sdk/5186AcroJS.pdf ==========
tonikitoo@igalia.com changed reviewers: + dsinclair@chromium.org, thestig@chromium.org, tsepez@chromium.org
PTAL
From reading the doc, it seems like it's Read-Only in Acrobat Reader but Read/Write in Acrobat. It is not allowed to be written when using Reader. I'm guessing we'd want to follow Acrobat instead of Acrobat Reader for these properties so they could be editable?
On 2016/08/10 18:38:54, dsinclair wrote: > From reading the doc, it seems like it's Read-Only in Acrobat Reader but > Read/Write in Acrobat. It is not allowed to be written when using Reader. > > I'm guessing we'd want to follow Acrobat instead of Acrobat Reader for these > properties so they could be editable? That is a good point, thanks/ The document in case is titled "Acrobat JavaScript Object Specification", and I assumed it comprises Acrobat's JS desired behavior rather than Acroread - in fact, it does not have any "acroread" mention. Does my understand make sense?
On 2016/08/10 18:48:14, tonikitoo1 wrote: > On 2016/08/10 18:38:54, dsinclair wrote: > > From reading the doc, it seems like it's Read-Only in Acrobat Reader but > > Read/Write in Acrobat. It is not allowed to be written when using Reader. > > > > I'm guessing we'd want to follow Acrobat instead of Acrobat Reader for these > > properties so they could be editable? > > That is a good point, thanks/ > > The document in case is titled "Acrobat JavaScript Object Specification", and I > assumed it comprises Acrobat's JS desired behavior rather than Acroread - in > fact, it does not have any "acroread" mention. > > Does my understand make sense? Ok, you are referring to "For the Acrobat Reader, this property returns an object with properties from the document information dictionary in the PDF file. Standard entries include Title, Author, Subject, Keywords, Creator, Producer, CreationDate, ModDate, and Trapped. See Table 8.2 on page 475, Entries in a document information dictionary, in the PDF Reference, for more details."
On 2016/08/10 18:48:14, tonikitoo1 wrote: > On 2016/08/10 18:38:54, dsinclair wrote: > > From reading the doc, it seems like it's Read-Only in Acrobat Reader but > > Read/Write in Acrobat. It is not allowed to be written when using Reader. > > > > I'm guessing we'd want to follow Acrobat instead of Acrobat Reader for these > > properties so they could be editable? > > That is a good point, thanks/ > > The document in case is titled "Acrobat JavaScript Object Specification", and I > assumed it comprises Acrobat's JS desired behavior rather than Acroread - in > fact, it does not have any "acroread" mention. > > Does my understand make sense? It seems like it has both. If you look at the listing for 'info' there are two listings together. The first starts with 'For the Acrobat Reader' and the second 'Within Acrobat,'. As well, it seems that the red 'x' displayed in their little 5 element array thing means: The fourth column indicates the availability or not of a property or method in the Acrobat Reader. If the X icon is present, the property or method is not allowed in any version of the Acrobat Reader.
On 2016/08/10 18:52:11, dsinclair wrote: > On 2016/08/10 18:48:14, tonikitoo1 wrote: > > On 2016/08/10 18:38:54, dsinclair wrote: > > > From reading the doc, it seems like it's Read-Only in Acrobat Reader but > > > Read/Write in Acrobat. It is not allowed to be written when using Reader. > > > > > > I'm guessing we'd want to follow Acrobat instead of Acrobat Reader for these > > > properties so they could be editable? > > > > That is a good point, thanks/ > > > > The document in case is titled "Acrobat JavaScript Object Specification", and > I > > assumed it comprises Acrobat's JS desired behavior rather than Acroread - in > > fact, it does not have any "acroread" mention. > > > > Does my understand make sense? > > > It seems like it has both. If you look at the listing for 'info' there are two > listings together. The first starts with 'For the Acrobat Reader' and the second > 'Within Acrobat,'. > > As well, it seems that the red 'x' displayed in their little 5 element array > thing means: > > The fourth column indicates the availability or not of a property or method in > the Acrobat > Reader. If the X icon is present, the property or method is not allowed in any > version of the > Acrobat Reader. Hum, ok. After reading both acrobat and acrobat reader paragraphs, and having in mind that PDFium wants to match the former, then what you are saying makes total sense. It might make sense to verify the document.info behavior in IE/acrobat too to make sure we match up there too (?). If not, I will close the issue.
On 2016/08/10 18:52:11, dsinclair wrote: > On 2016/08/10 18:48:14, tonikitoo1 wrote: > > On 2016/08/10 18:38:54, dsinclair wrote: > > > From reading the doc, it seems like it's Read-Only in Acrobat Reader but > > > Read/Write in Acrobat. It is not allowed to be written when using Reader. > > > > > > I'm guessing we'd want to follow Acrobat instead of Acrobat Reader for these > > > properties so they could be editable? > > > > That is a good point, thanks/ > > > > The document in case is titled "Acrobat JavaScript Object Specification", and > I > > assumed it comprises Acrobat's JS desired behavior rather than Acroread - in > > fact, it does not have any "acroread" mention. > > > > Does my understand make sense? > > > It seems like it has both. If you look at the listing for 'info' there are two > listings together. The first starts with 'For the Acrobat Reader' and the second > 'Within Acrobat,'. > > As well, it seems that the red 'x' displayed in their little 5 element array > thing means: > > The fourth column indicates the availability or not of a property or method in > the Acrobat > Reader. If the X icon is present, the property or method is not allowed in any > version of the > Acrobat Reader. Note, there is also a newer version of the JS API reference you may want to use instead of this one: http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_api_referenc...
The CQ bit was checked by dsinclair@chromium.org
lgtm Discussed this with Tom, since we don't support writing it makes sense to make it read only.
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Make Document's 'info' property readonly As per the PDF specification in [1], page 103, the 'info' property of the Document object is readonly. [1] http://partners.adobe.com/public/developer/en/acrobat/sdk/5186AcroJS.pdf ========== to ========== Make Document's 'info' property readonly As per the PDF specification in [1], page 103, the 'info' property of the Document object is readonly. [1] http://partners.adobe.com/public/developer/en/acrobat/sdk/5186AcroJS.pdf Committed: https://pdfium.googlesource.com/pdfium/+/ec2687680b0d033c3634e8dd0f8d8586c134... ==========
Message was sent while issue was closed.
Committed patchset #1 (id:1) as https://pdfium.googlesource.com/pdfium/+/ec2687680b0d033c3634e8dd0f8d8586c134... |