summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfm-x/pdfobj.c
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2015-12-29 04:43:56 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2015-12-29 04:43:56 +0000
commiteab42d1eec7c5a1a356ca867b1f629d7fe97c543 (patch)
tree01b73d6c63afd24336082fc3d1f2189419575863 /Build/source/texk/dvipdfm-x/pdfobj.c
parent30274123203d7d0e1813438dca96e6a0b6447613 (diff)
texk/dvipdfm-x: patches by S. Hirata.
git-svn-id: svn://tug.org/texlive/trunk@39229 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x/pdfobj.c')
-rw-r--r--Build/source/texk/dvipdfm-x/pdfobj.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/Build/source/texk/dvipdfm-x/pdfobj.c b/Build/source/texk/dvipdfm-x/pdfobj.c
index d11ab132660..c1b18278f34 100644
--- a/Build/source/texk/dvipdfm-x/pdfobj.c
+++ b/Build/source/texk/dvipdfm-x/pdfobj.c
@@ -125,11 +125,11 @@ struct pdf_dict
struct pdf_stream
{
- struct pdf_obj *dict;
- unsigned char *stream;
- int *objstm_data; /* used for object streams */
- unsigned int stream_length;
- unsigned int max_length;
+ struct pdf_obj *dict;
+ unsigned char *stream;
+ int *objstm_data; /* used for object streams */
+ unsigned int stream_length;
+ unsigned int max_length;
int32_t _flags;
struct decode_parms decodeparms;
};
@@ -320,7 +320,7 @@ add_xref_entry (unsigned label, unsigned char type, unsigned int field2, unsigne
#define BINARY_MARKER "%\344\360\355\370\n"
void
-pdf_out_init (const char *filename, int do_encryption)
+pdf_out_init (const char *filename, int do_encryption, int enable_objstm)
{
char v;
@@ -330,11 +330,16 @@ pdf_out_init (const char *filename, int do_encryption)
next_label = 1;
if (pdf_version >= 5) {
- xref_stream = pdf_new_stream(STREAM_COMPRESS);
- xref_stream->flags |= OBJ_NO_ENCRYPT;
- trailer_dict = pdf_stream_dict(xref_stream);
- pdf_add_dict(trailer_dict, pdf_new_name("Type"), pdf_new_name("XRef"));
- do_objstm = 1;
+ if (enable_objstm) {
+ xref_stream = pdf_new_stream(STREAM_COMPRESS);
+ xref_stream->flags |= OBJ_NO_ENCRYPT;
+ trailer_dict = pdf_stream_dict(xref_stream);
+ pdf_add_dict(trailer_dict, pdf_new_name("Type"), pdf_new_name("XRef"));
+ do_objstm = 1;
+ } else {
+ trailer_dict = pdf_new_dict();
+ do_objstm = 0;
+ }
} else {
xref_stream = NULL;
trailer_dict = pdf_new_dict();