summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfm-x/pdfencrypt.c
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-08-26 23:28:58 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-08-26 23:28:58 +0000
commit3db2581dfeef53ee35167ecdd6d80ce07238434f (patch)
tree15ec36daf4c923b67481944d5412cc0c57d14b85 /Build/source/texk/dvipdfm-x/pdfencrypt.c
parent5c4fcece888ee328ff7d9a04ca94e053bc279749 (diff)
Additional dictionary keys can be specified for tounicode conversion (S. Hirata).
git-svn-id: svn://tug.org/texlive/trunk@48493 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x/pdfencrypt.c')
-rw-r--r--Build/source/texk/dvipdfm-x/pdfencrypt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Build/source/texk/dvipdfm-x/pdfencrypt.c b/Build/source/texk/dvipdfm-x/pdfencrypt.c
index d387172b2bf..e7d307bd801 100644
--- a/Build/source/texk/dvipdfm-x/pdfencrypt.c
+++ b/Build/source/texk/dvipdfm-x/pdfencrypt.c
@@ -579,6 +579,9 @@ pdf_enc_set_passwd (unsigned int bits, unsigned int perm,
check_version(p, version);
p->P = (int32_t) (perm | 0xC0U);
+ /* Bit position 10 shall be always set to 1 for PDF >= 2.0. */
+ if (version >= 20)
+ p->P |= (1 << 9);
switch (p->V) {
case 1:
p->R = (p->P < 0x100L) ? 2 : 3;