Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Issue 2337673002: Annotations and fields do not have DR (Closed)

Created:
4 years, 3 months ago by npm
Modified:
4 years, 3 months ago
CC:
pdfium-reviews_googlegroups.com
Target Ref:
refs/heads/master
Project:
pdfium
Visibility:
Public.

Description

Remove GetDictBy("DR") from annot/field dictionaries We should not use DR field from annotation/field dictionaries, since these are not supposed to have one. In PDF spec 1.7, DR is defined only for the form dictionary, in 8.6.1. In addition, note 118 in Appendix H says "In PDF 1.2, an additional entry in the field dictionary, DR, was defined but was never implemented. Beginning with PDF 1.5, this entry is obsolete and should be ignored." The changes in CBA_FontMap fix the bug below. The changes in cpvt_generateap do not affect the bug but follow the reasoning from the above paragraph. BUG=pdfium:538 Committed: https://pdfium.googlesource.com/pdfium/+/860a2d0299996d253272d831c9c7e533e9d3e890

Patch Set 1 #

Total comments: 8

Patch Set 2 : Nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -41 lines) Patch
M core/fpdfdoc/cpvt_generateap.cpp View 1 1 chunk +6 lines, -17 lines 0 comments Download
M fpdfsdk/formfiller/cba_fontmap.cpp View 1 1 chunk +17 lines, -24 lines 0 comments Download

Messages

Total messages: 17 (9 generated)
npm
PTAL
4 years, 3 months ago (2016-09-12 20:40:58 UTC) #5
dsinclair
Is there any way we can add a test for this? https://codereview.chromium.org/2337673002/diff/1/fpdfsdk/formfiller/cba_fontmap.cpp File fpdfsdk/formfiller/cba_fontmap.cpp (right): ...
4 years, 3 months ago (2016-09-12 20:51:49 UTC) #8
Tom Sepez
Looks like this would be tough to test.
4 years, 3 months ago (2016-09-12 21:16:33 UTC) #10
Tom Sepez
https://codereview.chromium.org/2337673002/diff/1/core/fpdfdoc/cpvt_generateap.cpp File core/fpdfdoc/cpvt_generateap.cpp (right): https://codereview.chromium.org/2337673002/diff/1/core/fpdfdoc/cpvt_generateap.cpp#newcode49 core/fpdfdoc/cpvt_generateap.cpp:49: CPDF_Dictionary* pDRDict = pFormDict->GetDictBy("DR"); nit: maybe just early return ...
4 years, 3 months ago (2016-09-12 21:19:22 UTC) #11
npm
For now, just tested that this fixes the bug in Chrome. PTAL https://codereview.chromium.org/2337673002/diff/1/core/fpdfdoc/cpvt_generateap.cpp File core/fpdfdoc/cpvt_generateap.cpp ...
4 years, 3 months ago (2016-09-12 21:40:12 UTC) #12
Tom Sepez
lgtm
4 years, 3 months ago (2016-09-12 21:47:03 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2337673002/20001
4 years, 3 months ago (2016-09-12 21:47:58 UTC) #15
commit-bot: I haz the power
4 years, 3 months ago (2016-09-12 22:02:34 UTC) #17
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://pdfium.googlesource.com/pdfium/+/860a2d0299996d253272d831c9c7e533e9d3...

Powered by Google App Engine
This is Rietveld 408576698