summaryrefslogtreecommitdiff
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
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
-rw-r--r--Build/source/texk/dvipdfm-x/ChangeLog10
-rwxr-xr-xBuild/source/texk/dvipdfm-x/configure22
-rw-r--r--Build/source/texk/dvipdfm-x/configure.ac2
-rw-r--r--Build/source/texk/dvipdfm-x/jpegimage.c22
-rw-r--r--Build/source/texk/dvipdfm-x/pdfencrypt.c3
-rw-r--r--Build/source/texk/dvipdfm-x/spc_pdfm.c26
6 files changed, 69 insertions, 16 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog
index bb43949934f..8894e7fa9c5 100644
--- a/Build/source/texk/dvipdfm-x/ChangeLog
+++ b/Build/source/texk/dvipdfm-x/ChangeLog
@@ -1,3 +1,13 @@
+2018-08-27 Shunsaku Hirata <shunsaku.hirata74@gmail.com>
+
+ * jpegimage.c: Do not write application specific markers which
+ are not necessary for displaying images.
+ * pdfencrypt.c: Set a compatibility flag bit for PDF 2.0.
+ * spc_pdfm.c: Fixed a bug that string objects are not handled
+ properly in pdf:stream special. Additional dictionay keys can
+ be specified for tounicode conversion.
+ * configure.ac: Version 20180827.
+
2018-08-23 Shunsaku Hirata <shunsaku.hirata74@gmail.com>
* type1.c: Add glyph names of component glyphs used by seac
diff --git a/Build/source/texk/dvipdfm-x/configure b/Build/source/texk/dvipdfm-x/configure
index b0e01366694..7fe8cad0eec 100755
--- a/Build/source/texk/dvipdfm-x/configure
+++ b/Build/source/texk/dvipdfm-x/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for dvipdfm-x (TeX Live) 20180823.
+# Generated by GNU Autoconf 2.69 for dvipdfm-x (TeX Live) 20180827.
#
# Report bugs to <tex-k@tug.org>.
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='dvipdfm-x (TeX Live)'
PACKAGE_TARNAME='dvipdfm-x--tex-live-'
-PACKAGE_VERSION='20180823'
-PACKAGE_STRING='dvipdfm-x (TeX Live) 20180823'
+PACKAGE_VERSION='20180827'
+PACKAGE_STRING='dvipdfm-x (TeX Live) 20180827'
PACKAGE_BUGREPORT='tex-k@tug.org'
PACKAGE_URL=''
@@ -1350,7 +1350,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures dvipdfm-x (TeX Live) 20180823 to adapt to many kinds of systems.
+\`configure' configures dvipdfm-x (TeX Live) 20180827 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1421,7 +1421,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of dvipdfm-x (TeX Live) 20180823:";;
+ short | recursive ) echo "Configuration of dvipdfm-x (TeX Live) 20180827:";;
esac
cat <<\_ACEOF
@@ -1551,7 +1551,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-dvipdfm-x (TeX Live) configure 20180823
+dvipdfm-x (TeX Live) configure 20180827
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2390,7 +2390,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by dvipdfm-x (TeX Live) $as_me 20180823, which was
+It was created by dvipdfm-x (TeX Live) $as_me 20180827, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -8075,7 +8075,7 @@ fi
# Define the identity of the package.
PACKAGE='dvipdfm-x--tex-live-'
- VERSION='20180823'
+ VERSION='20180827'
cat >>confdefs.h <<_ACEOF
@@ -14744,7 +14744,7 @@ Usage: $0 [OPTIONS]
Report bugs to <bug-libtool@gnu.org>."
lt_cl_version="\
-dvipdfm-x (TeX Live) config.lt 20180823
+dvipdfm-x (TeX Live) config.lt 20180827
configured by $0, generated by GNU Autoconf 2.69.
Copyright (C) 2011 Free Software Foundation, Inc.
@@ -16624,7 +16624,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by dvipdfm-x (TeX Live) $as_me 20180823, which was
+This file was extended by dvipdfm-x (TeX Live) $as_me 20180827, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -16694,7 +16694,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-dvipdfm-x (TeX Live) config.status 20180823
+dvipdfm-x (TeX Live) config.status 20180827
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/Build/source/texk/dvipdfm-x/configure.ac b/Build/source/texk/dvipdfm-x/configure.ac
index c6f7cd52de0..251576a5b0b 100644
--- a/Build/source/texk/dvipdfm-x/configure.ac
+++ b/Build/source/texk/dvipdfm-x/configure.ac
@@ -7,7 +7,7 @@ dnl This file is free software; the copyright holder
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl
-AC_INIT([dvipdfm-x (TeX Live)], [20180823], [tex-k@tug.org])
+AC_INIT([dvipdfm-x (TeX Live)], [20180827], [tex-k@tug.org])
AC_PREREQ([2.65])
AC_CONFIG_SRCDIR([agl.c])
AC_CONFIG_AUX_DIR([../../build-aux])
diff --git a/Build/source/texk/dvipdfm-x/jpegimage.c b/Build/source/texk/dvipdfm-x/jpegimage.c
index 31ab76f03a4..18130a50809 100644
--- a/Build/source/texk/dvipdfm-x/jpegimage.c
+++ b/Build/source/texk/dvipdfm-x/jpegimage.c
@@ -955,6 +955,12 @@ JPEG_copy_stream (struct JPEG_info *j_info, pdf_obj *stream, FILE *fp)
return (found_SOFn ? 0 : -1);
}
+/* Adobe Technical Note #5116 "Supporting the DCT Filters in PostScript Level 2"
+ * 6. "DCTDecode Filter Summary"
+ * ... APPn (application-specific) markers are skipped over harmlessly except
+ * for the Adobe reserved marker described later.
+ *
+ */
#define SET_SKIP(j,c) if ((c) < MAX_COUNT) { \
(j)->skipbits[(c) / 8] |= (1 << (7 - ((c) % 8))); \
}
@@ -990,11 +996,17 @@ JPEG_scan_file (struct JPEG_info *j_info, FILE *fp)
return -1;
length -= 5;
if (!memcmp(app_sig, "JFIF\000", 5)) {
+ /* APP0 JFIF marker preserved */
j_info->flags |= HAVE_APPn_JFIF;
length -= read_APP0_JFIF(j_info, fp);
} else if (!memcmp(app_sig, "JFXX", 5)) {
length -= read_APP0_JFXX(fp, length);
+ SET_SKIP(j_info, count);
+ } else {
+ SET_SKIP(j_info, count);
}
+ } else {
+ SET_SKIP(j_info, count);
}
seek_relative(fp, length);
break;
@@ -1004,6 +1016,7 @@ JPEG_scan_file (struct JPEG_info *j_info, FILE *fp)
return -1;
length -= 5;
if (!memcmp(app_sig, "Exif\000", 5)) {
+ /* APP1 Exif marker preserved */
j_info->flags |= HAVE_APPn_Exif;
length -= read_APP1_Exif(j_info, fp, length);
} else if (!memcmp(app_sig, "http:", 5) && length > 24) {
@@ -1013,9 +1026,11 @@ JPEG_scan_file (struct JPEG_info *j_info, FILE *fp)
if (!memcmp(app_sig, "//ns.adobe.com/xap/1.0/\000", 24)) {
j_info->flags |= HAVE_APPn_XMP;
length -= read_APP1_XMP(j_info, fp, length);
- SET_SKIP(j_info, count);
}
+ SET_SKIP(j_info, count);
}
+ } else {
+ SET_SKIP(j_info, count);
}
seek_relative(fp, length);
break;
@@ -1027,10 +1042,10 @@ JPEG_scan_file (struct JPEG_info *j_info, FILE *fp)
if (!memcmp(app_sig, "ICC_PROFILE\000", 12)) {
j_info->flags |= HAVE_APPn_ICC;
length -= read_APP2_ICC(j_info, fp, length);
- SET_SKIP(j_info, count);
}
}
seek_relative(fp, length);
+ SET_SKIP(j_info, count);
break;
case JM_APP14:
if (length > 5) {
@@ -1038,11 +1053,14 @@ JPEG_scan_file (struct JPEG_info *j_info, FILE *fp)
return -1;
length -= 5;
if (!memcmp(app_sig, "Adobe", 5)) {
+ /* APP14 Adobe marker preserved */
j_info->flags |= HAVE_APPn_ADOBE;
length -= read_APP14_Adobe(j_info, fp);
} else {
SET_SKIP(j_info, count);
}
+ } else {
+ SET_SKIP(j_info, count);
}
seek_relative(fp, length);
break;
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;
diff --git a/Build/source/texk/dvipdfm-x/spc_pdfm.c b/Build/source/texk/dvipdfm-x/spc_pdfm.c
index f67b1e600f7..66501a16634 100644
--- a/Build/source/texk/dvipdfm-x/spc_pdfm.c
+++ b/Build/source/texk/dvipdfm-x/spc_pdfm.c
@@ -1484,8 +1484,7 @@ spc_handler_pdfm_stream_with_type (struct spc_env *spe, struct spc_arg *args, in
break;
case STRING_STREAM:
fstream = pdf_new_stream(STREAM_COMPRESS);
- if (instring)
- pdf_add_stream(fstream, instring, strlen(instring));
+ pdf_add_stream(fstream, pdf_string_value(tmp), pdf_string_length(tmp));
break;
default:
pdf_release_obj(tmp);
@@ -1864,6 +1863,7 @@ spc_handler_pdfm_tounicode (struct spc_env *spe, struct spc_arg *args)
{
struct spc_pdf_ *sd = &_pdf_stat;
char *cmap_name;
+ pdf_obj *taint_keys;
/* First clear */
sd->cd.cmap_id = -1;
@@ -1904,6 +1904,28 @@ spc_handler_pdfm_tounicode (struct spc_env *spe, struct spc_arg *args)
sd->cd.unescape_backslash = 1;
}
RELEASE(cmap_name);
+
+ /* Additional "taint key" */
+ taint_keys = parse_pdf_object(&args->curptr, args->endptr, NULL);
+ if (taint_keys) {
+ if (PDF_OBJ_ARRAYTYPE(taint_keys)) {
+ int i;
+ for (i = 0; i < pdf_array_length(taint_keys); i++) {
+ pdf_obj *key;
+
+ key = pdf_get_array(taint_keys, i);
+ if (PDF_OBJ_NAMETYPE(key))
+ pdf_add_array(sd->cd.taintkeys, pdf_link_obj(key));
+ else {
+ spc_warn(spe, "Invalid argument specified in pdf:tounicode special.");
+ }
+ }
+ } else {
+ spc_warn(spe, "Invalid argument specified in pdf:unicode special.");
+ }
+ pdf_release_obj(taint_keys);
+ }
+
return 0;
}