pdftex[817] branches/stable: new primitive \pdfmajorversion

commits+karl at tug.org commits+karl at tug.org
Wed Nov 27 23:45:00 CET 2019


Revision: 817
          http://tug.org/svn/pdftex?view=revision&revision=817
Author:   karl
Date:     2019-11-27 23:44:59 +0100 (Wed, 27 Nov 2019)
Log Message:
-----------
new primitive \pdfmajorversion

Modified Paths:
--------------
    branches/stable/doc/manual/ChangeLog
    branches/stable/doc/manual/pdftex-t.tex
    branches/stable/source/src/texk/web2c/pdftexdir/ChangeLog
    branches/stable/source/src/texk/web2c/pdftexdir/NEWS
    branches/stable/source/src/texk/web2c/pdftexdir/pdftex-common.h
    branches/stable/source/src/texk/web2c/pdftexdir/pdftex.web
    branches/stable/source/src/texk/web2c/pdftexdir/pdftoepdf.cc
    branches/stable/source/src/texk/web2c/pdftexdir/ptexlib.h
    branches/stable/source/src/texk/web2c/pdftexdir/writeimg.c
    branches/stable/source/src/texk/web2c/pdftexdir/writepng.c

Added Paths:
-----------
    branches/stable/tests/12-pdf2/
    branches/stable/tests/12-pdf2/Makefile
    branches/stable/tests/12-pdf2/incl1.tex
    branches/stable/tests/12-pdf2/incl2.tex
    branches/stable/tests/12-pdf2/test-compress2.tex
    branches/stable/tests/12-pdf2/test-doc1incl2.tex
    branches/stable/tests/12-pdf2/test-doc2incl1.tex
    branches/stable/tests/12-pdf2/test-doc2incl2.tex
    branches/stable/tests/12-pdf2/test-pdfmajor.tex

Modified: branches/stable/doc/manual/ChangeLog
===================================================================
--- branches/stable/doc/manual/ChangeLog	2019-11-23 23:34:02 UTC (rev 816)
+++ branches/stable/doc/manual/ChangeLog	2019-11-27 22:44:59 UTC (rev 817)
@@ -1,3 +1,8 @@
+2019-11-25  Karl Berry  <karl at freefriends.org>
+
+	* pdftex-t.tex: document \pdfmajorversion. Besides the new
+	primitive description, affects \pdfobjcompresslevel and \pdfhicolor.
+
 2019-01-19  Karl Berry  <karl at freefriends.org>
 
 	* pdftex-t.tex (\currentpdftex): 1.40.20 (for TeX Live 2019).

Modified: branches/stable/doc/manual/pdftex-t.tex
===================================================================
--- branches/stable/doc/manual/pdftex-t.tex	2019-11-23 23:34:02 UTC (rev 816)
+++ branches/stable/doc/manual/pdftex-t.tex	2019-11-27 22:44:59 UTC (rev 817)
@@ -575,6 +575,7 @@
     Hartmut Henkel\par
     Pawe\l\ Jackowski\par
     Martin Schr\"oder\par
+    Karl Berry\par
 
     \vskip3ex
 
@@ -661,7 +662,7 @@
 \MLTEX\ and \ENCTEX; these are also included in the current \PDFTEX\
 code.
 
-\PDFTEX\ is maintained by \THANH, Martin Schr\"oder, and others. The
+\PDFTEX\ is maintained by \THANH\ and others. The
 \PDFTEX\ homepage is \from [ptex_org]. Please send \PDFTEX\ comments and
 bug reports to the mailing list \from [ptex_bugs] (\from [ptex_listinfo]).
 
@@ -910,10 +911,10 @@
 file \filename{texmf.cnf} can also be set up by the environment variable
 \type{TEXMFCNF}.
 
-The \filename{texmf.cnf} files coming with the major \TEX\ distributions
-should already be set up for normal use, so you shouldn't need to edit
-it. You might still like to read it to see where the various bits and
-pieces are going.
+The configuration files in the major \TEX\ distributions (such as
+\filename{texmf.cnf} in \TEXLIVE) should already be set up for normal
+use, so you shouldn't need to edit it. You might still like to read it
+to see where the various bits and pieces are going.
 
 \PDFTEX\ uses the search path variables shown in
 \in{table}[tbl:spathvar], among others.
@@ -1057,6 +1058,7 @@
 \NC \type{\pdfuniqueresname}       \NC integer   \NC      0 \NC                      \NC\NR
 \NC \type{\pdfprotrudechars}       \NC integer   \NC      0 \NC                      \NC\NR
 \NC \type{\pdfgentounicode}        \NC integer   \NC      0 \NC                      \NC\NR
+\NC \type{\pdfmajorversion}        \NC integer   \NC      1 \NC output \PDF\ 1.4 by default            \NC\NR
 \NC \type{\pdfminorversion}        \NC integer   \NC      4 \NC \PDF\ 1.4            \NC\NR
 \NC \type{\pdfpagebox}             \NC integer   \NC      0 \NC                      \NC\NR
 \NC \type{\pdfforcepagebox}        \NC integer   \NC      0 \NC                      \NC\NR
@@ -2144,27 +2146,38 @@
 \LATEX), so \type{\pdfoutput} may be defined even when the output format
 is \DVI.
 
+\pdftexprimitive{\Syntax{\Tex{\pdfmajorversion} \Whatever{integer}}}
+\bookmark{\tex{pdfmajorversion}}
+
 \pdftexprimitive{\Syntax{\Tex{\pdfminorversion} \Whatever{integer}}}
 \bookmark{\tex{pdfminorversion}}
 
-This primitive sets the \PDF\ version of the generated file and the
-highest \PDF\ version of included \PDF{}s allowed without warning, by
-default (see \type{\pdfinclusionerrorlevel}).  The default compiled into
-the \PDFTEX\ program is \type{\pdfminorversion=4}, setting the \PDF\
-version to~1.4 and allowing included \PDF\ files with versions up
-to~1.4.  If specified, this primitive must appear before any data is to
-be written to the generated \PDF\ file.
+Together, these two primitives specify the \PDF\ version for generated \PDF\
+output. The defaults compiled into the \PDFTEX\ program are
+\type{\pdfmajorversion=1} and \type{\pdfminorversion=4}, thus \PDF~1.4
+is generated by default.
 
-Distributions typically alter the engine's compiled default of~4 when
-building formats; for example, as of 2010, \TEXLIVE\ sets
-\type{\pdfminorversion=5} when formats are built.  This is so object
-compression can be enabled (described below).
+However, distributions typically alter the engine's compiled default
+minor version of~4 when building formats. For example, as of 2010,
+\TEXLIVE\ sets \type{\pdfminorversion=5} when formats are built. This is
+so object compression can be enabled (see \type{\pdfobjcompress} below).
 
-This was originally a shortened synonym of the
+This value also defines the highest \PDF\ version for included \PDF{}s
+to be allowed without error, by default (see
+\type{\pdfinclusionerrorlevel}).
+
+The values for both must be $\ge\,1$ but are not checked further.
+Furthermore, they are set independently; only setting 
+\type{\pdfmajorversion=2} would result in \PDF~2.4 output; it's
+necessary to additionally set \type{\pdfminorversion}.
+
+If specified, these primitives must appear before any data is to be
+written to the generated \PDF\ file. The \type{\pdfmajorversion}
+primitive was introduced in \PDFTEX\ 1.40.21. \type{\pdfminorversion}
+was originally a shortened synonym of the
 \type{\pdfoptionpdfminorversion} command, which is now obsolete.
 \introduced{1.30.0}
 
-
 \pdftexprimitive{\Syntax{\Tex{\pdfcompresslevel} \Whatever{integer}}}
 \bookmark{\tex{pdfcompresslevel}}
 
@@ -2181,43 +2194,50 @@
 \bookmark{\tex{pdfobjcompresslevel}}
 
 This integer parameter controls the compression of {\em non-stream}
-objects. In the \PDF-1.4 specification these objects still had to go into
+objects. If specified, the parameter must appear before any data is
+written to the \PDF\ output. \introduced{1.40.0}
+
+In the \PDF-1.4 specification, non-stream objects had to be written in
 the \PDF\ file as clear text, uncompressed. The \PDF-1.5 specification
-now allows to collect non-stream objects as ``compressed objects'' into
-``object stream'' objects (\type{/Type /ObjStm}, see \PDF\ Ref.\ 5th~ed.,
-sect.~3.4.6). At the \PDF\ file end instead of the object table then
-an \type{/XRef} cross-reference stream is written out. This results in
-considerably smaller \PDF\ files, particularly if lots of annotations
-and links are used.
-\introduced{1.40.0}
+allows collecting non-stream objects as ``compressed objects'' into
+``object stream'' objects (\type{/Type /ObjStm}, see \PDF\ Ref.\
+5th~ed., sect.~3.4.6). At the end of the \PDF\ file, an \type{/XRef}
+cross-reference stream is then written out instead of the object table.
+This can result in a considerably smaller \PDF\ file, particularly if
+lots of annotations and links are used.
 
 The writing of compressed objects is enabled by setting
-\type{\pdfobjcompresslevel} to a value between~1 and~3; it's
-disabled by value~0 (default). Enabling requires that also
-\type{\pdfminorversion}~$>$~4. If \type{\pdfobjcompresslevel}~$>$~0,
-but \type{\pdfminorversion}~$<$~5, a warning is given and object stream
-writing is disabled. The \type{\pdfobjcompresslevel} value is clipped
-to the range $0..3$. Using values outside this range is not recommended
-(for future extension).
+\type{\pdfobjcompresslevel} to a value between~1 and~3; it's disabled
+if~0 (default). Object compression also requires that
+\type{\pdfminorversion}$\,\ge\,$5 (or
+\type{\pdfmajorversion}$\,\ge\,$2), else a warning is given and the
+compression is disabled. The \type{\pdfobjcompresslevel} value is
+clipped to the range $0..3$. Using values outside this range is not
+recommended (for future extension).
 
 The \type{\pdfobjcompresslevel} settings have the following effects:
-When set to~0, no object streams are generated at all. When set to~1,
+\startitemize[0,packed]
+\item When set to~0, no object streams are generated at all.
+\item When set to~1,
 all non-stream objects are compressed with the exception of any objects
 coming with embedded \PDF\ files (``paranoid'' mode, to avoid yet unknown
 problems), and also the \type{/Info} dictionary is not compressed for
-clear-text legibility. When set to~2, also all non-stream objects coming
+clear-text legibility.
+\item When set to~2, also all non-stream objects coming
 with embedded \PDF\ files are compressed, but the \type{/Info} dictionary
-is still not compressed. Finally, when set to~3, all non-stream objects
+is still not compressed.
+\item Finally, when set to~3, all non-stream objects
 are compressed, including the \type{/Info} dictionary (this means that
 the \type{/Info} can't be read as clear text any more). If object streams
 are to be used, currently \type{\pdfobjcompresslevel=2} is recommended,
 and is so specified in some distributions, including \TEXLIVE~2010 and later.
+\stopitemize
 
-\description{Caveat:} \PDF\ files generated with object streams enabled
-can't be read with (sufficiently old) \PDF\ viewers that don't
-understand \PDF-1.5 files. For widest distribution and unknown audience,
-don't activate object stream writing. The \PDF-1.5 standard describes
-also a hybrid object compression mode that gives some backward
+\description{Compatibility caveat:} \PDF\ files generated with object
+streams enabled can't be read with (sufficiently old) \PDF\ viewers that
+don't understand \PDF-1.5 files. For widest distribution and unknown
+audience, don't activate object stream writing. The \PDF-1.5 standard
+describes also a hybrid object compression mode that gives some backward
 compatibility, but this is currently not implemented, as \PDF-1.5 was
 rather quickly adopted by modern \PDF\ viewers. Also not implemented is
 the optional \type{/Extends} key.
@@ -3593,10 +3613,11 @@
 \bookmark{\tex{pdfinclusionerrorlevel}}
 
 This controls the behavior of \PDFTEX\ when a \PDF\ file is included
-that has a newer version than the one specified by
-\type{\pdfminorversion}.  If \type{\pdfinclusionerrorlevel} is set to~0
-(the default), \PDFTEX\ gives only a warning; if 1, \PDFTEX\ raises an
-error; if negative, no diagnostic at all is given.
+which has a newer \PDF\ version than the one specified by
+\type{\pdfmajorversion} and \type{\pdfminorversion}. If
+\type{\pdfinclusionerrorlevel} is set to~0 (the default), \PDFTEX\ gives
+only a warning; if 1, \PDFTEX\ raises an error; if negative, no
+diagnostic at all is given.
 
 It was originally a shortened synonym of
 \type{\pdfoptionpdfinclusionerrorlevel}, which is now obsolete.
@@ -3605,14 +3626,16 @@
 \pdftexprimitive{\Syntax{\Tex{\pdfimagehicolor} \Whatever{integer}}}
 \bookmark{\tex{pdfimagehicolor}}
 
-This primitive, when set to~1, enables embedding of \PNG\ images with
-16~bit wide color channels at their full color resolution. As such an
-embedding mode is defined only from \PDF\ version~1.5 onwards, the
+This parameter, when set to~1, enables embedding of \PNG\ images with
+16~bit wide color channels at their full color resolution. This
+embedding mode is defined only from \PDF\ version~1.5 onwards, so the
 \type{\pdfimagehicolor} functionality is automatically disabled in
-\PDFTEX\ if \type{\pdfminorversion}~$<$~5; then each 16~bit color
-channel is reduced to a width of 8~bit by stripping the lower 8~bits
-before embedding. The same stripping happens when
-\type{\pdfimagehicolor} is set to~0. For \type{\pdfminorversion}~$\ge$~5
+\PDFTEX\ if \type{\pdfminorversion}$\,<\,$5 and
+\type{\pdfmajorversion}$\,=\,$1; in this case, each 16~bit color channel
+is reduced to a width of 8~bits by stripping the lower 8~bits before
+embedding. The same stripping happens when \type{\pdfimagehicolor} is
+set to~0. If \type{\pdfmajorversion}$\,=\,$1 and
+\type{\pdfminorversion}$\,\ge\,$5, or \type{\pdfmajorversion}$\,\ge\,$2,
 the default value of \type{\pdfimagehicolor} is~1. If specified, the
 parameter must appear before any data is written to the \PDF\ output.
 \introduced{1.30.0}
@@ -3621,7 +3644,7 @@
 \bookmark{\tex{pdfimageapplygamma}}
 
 This primitive, when set to~1, enables gamma correction while embedding
-\PNG\ images, taking the values of the primitives \type{\pdfgamma} as
+\PNG\ images, taking the value of the primitive \type{\pdfgamma} as
 well as the gamma value embedded in the \PNG\ image into account. When
 \type{\pdfimageapplygamma} is set to~0, no gamma correction is
 performed.  If specified, the parameter must appear before any data is
@@ -3634,7 +3657,7 @@
 promilles (same as \type{\mag}). The default value of this primitive
 is~1000, defining a device gamma value of~1.0.
 
-When \type{\pdfimageapplygamma} is set to~1, then whenever a \PNG\ image
+If \type{\pdfimageapplygamma} is set to~1, then whenever a \PNG\ image
 is included, \PDFTEX\ applies a gamma correction. This correction is
 based on the  value of the \type{\pdfgamma} primitive and the `assumed
 device gamma' that is derived from the value embedded in the actual
@@ -4340,7 +4363,9 @@
 images but does everything else (including writing auxiliary files),
 thus speeding up compilations when you know you need an extra run but
 don't care about the output, \eg\ just to get the \BIBTEX\ references
-right.  \introduced{1.40.0}
+right.  If specified, the parameter must appear before any data is written to the
+\PDF\ output.
+\introduced{1.40.0}
 
 
 \pdftexprimitive{\Syntax{\Tex{\pdfinsertht} \Something{integer}

Modified: branches/stable/source/src/texk/web2c/pdftexdir/ChangeLog
===================================================================
--- branches/stable/source/src/texk/web2c/pdftexdir/ChangeLog	2019-11-23 23:34:02 UTC (rev 816)
+++ branches/stable/source/src/texk/web2c/pdftexdir/ChangeLog	2019-11-27 22:44:59 UTC (rev 817)
@@ -1,3 +1,27 @@
+2019-11-25  Joseph Wright  <joseph.wright at morningstar2.co.uk>
+
+	* pdftex.web: New primitive \pdfmajorversion.
+	(pdf_major_version_code, pdf_major_version, print_param,
+         <Put each...>): housekeeping.
+	(<Initialize table entries...>): default 1.
+	(<Glob...>): fixed_pdf_major_version.
+	(pdf_version_written, <Set init...>): rename from
+	pdf_minor_version_written.
+	(check_pdfversion): rename from check_pdfminorversion,
+	and also check pdf_major_version for sanity, and set the fixed_ value,
+	and use pdf_major_version in the %PDF- line.
+	(pdf_begin_obj, pdf_begin_dict, <Initialize variables ...>,
+	 <Implement \.{\\pdfximage}>): change call to check_pdfversion. 
+	<Undump pdftex data>: undump pdf_major_version.
+	(scan_image): include pdf_major_version in call to read_image.
+	* pdftoepdf.cc (read_pdf_info): new arg major_pdf_version_wanted,
+	and check it when including PDF.
+	* ptexlib.h (readimage, undumpimagemeta): new integer args in decl.
+	* writeimg.c (readimage, undumpimagemeta): new arg
+	pdfmajorversion, and check it.
+	* writepng.c (read_png_info): check fixedpdfmajorversion
+	along with fixedpdfminorversion for various png color attributes.
+
 2019-08-06  Karl Berry  <karl at freefriends.org>
 
 	* tests/cnfline.test,

Modified: branches/stable/source/src/texk/web2c/pdftexdir/NEWS
===================================================================
--- branches/stable/source/src/texk/web2c/pdftexdir/NEWS	2019-11-23 23:34:02 UTC (rev 816)
+++ branches/stable/source/src/texk/web2c/pdftexdir/NEWS	2019-11-27 22:44:59 UTC (rev 817)
@@ -1,6 +1,8 @@
 pdfTeX 3.14159265-2.6-1.40.20 (TeX Live 2019)
 - changes:
   - new primitive \expanded (from unreleased pdftex 1.50 branch + luatex).
+  - new primitive parameter \pdfmajorversion; 1 by default, but can be
+    set to any positive integer; affects only the %PDF- line.
   - new primitive parameter \pdfomitcharset; zero by default to include
     the /CharSet value from the PDF output as usual; setting to 1 omits
     it, since it cannot feasibly be guaranteed correct as the PDF/A-2

Modified: branches/stable/source/src/texk/web2c/pdftexdir/pdftex-common.h
===================================================================
--- branches/stable/source/src/texk/web2c/pdftexdir/pdftex-common.h	2019-11-23 23:34:02 UTC (rev 816)
+++ branches/stable/source/src/texk/web2c/pdftexdir/pdftex-common.h	2019-11-27 22:44:59 UTC (rev 817)
@@ -83,7 +83,7 @@
 /* pdftoepdf.cc */
 extern void epdf_check_mem(void);
 extern void epdf_delete(void);
-extern int read_pdf_info(char *, char *, int, int, int, int);
+extern int read_pdf_info(char *, char *, int, int, int, int, int);
 
 /* utils.c */
 extern char *convertStringToPDFString(const char *in, int len);

Modified: branches/stable/source/src/texk/web2c/pdftexdir/pdftex.web
===================================================================
--- branches/stable/source/src/texk/web2c/pdftexdir/pdftex.web	2019-11-23 23:34:02 UTC (rev 816)
+++ branches/stable/source/src/texk/web2c/pdftexdir/pdftex.web	2019-11-27 22:44:59 UTC (rev 817)
@@ -5669,31 +5669,32 @@
 @d pdf_unique_resname_code   = pdftex_first_integer_code + 6 {generate unique names for resouces}
 @d pdf_option_always_use_pdfpagebox_code = pdftex_first_integer_code + 7 {if the PDF inclusion should always use a specific PDF page box}
 @d pdf_option_pdf_inclusion_errorlevel_code = pdftex_first_integer_code + 8 {if the PDF inclusion should treat pdfs newer than |pdf_minor_version| as an error}
- at d pdf_minor_version_code = pdftex_first_integer_code + 9 {fractional part of the PDF version produced}
- at d pdf_force_pagebox_code = pdftex_first_integer_code + 10 {if the PDF inclusion should always use a specific PDF page box}
- at d pdf_pagebox_code = pdftex_first_integer_code + 11 {default pagebox to use for PDF inclusion}
- at d pdf_inclusion_errorlevel_code = pdftex_first_integer_code + 12 {if the PDF inclusion should treat pdfs newer than |pdf_minor_version| as an error}
- at d pdf_gamma_code            = pdftex_first_integer_code + 13
- at d pdf_image_gamma_code      = pdftex_first_integer_code + 14
- at d pdf_image_hicolor_code    = pdftex_first_integer_code + 15
- at d pdf_image_apply_gamma_code = pdftex_first_integer_code + 16
- at d pdf_adjust_spacing_code   = pdftex_first_integer_code + 17 {level of spacing adjusting}
- at d pdf_protrude_chars_code   = pdftex_first_integer_code + 18 {protrude chars at left/right edge of paragraphs}
- at d pdf_tracing_fonts_code    = pdftex_first_integer_code + 19 {level of font detail in log}
- at d pdf_objcompresslevel_code = pdftex_first_integer_code + 20 {activate object streams}
- at d pdf_adjust_interword_glue_code    = pdftex_first_integer_code + 21 {adjust interword glue?}
- at d pdf_prepend_kern_code     = pdftex_first_integer_code + 22 {prepend kern before certain characters?}
- at d pdf_append_kern_code      = pdftex_first_integer_code + 23 {append kern before certain characters?}
- at d pdf_gen_tounicode_code    = pdftex_first_integer_code + 24 {generate ToUnicode for fonts?}
- at d pdf_draftmode_code        = pdftex_first_integer_code + 25 {switch on draftmode if positive}
- at d pdf_inclusion_copy_font_code = pdftex_first_integer_code + 26 {generate ToUnicode for fonts?}
- at d pdf_suppress_warning_dup_dest_code    = pdftex_first_integer_code + 27 {suppress warning about duplicated destinations}
- at d pdf_suppress_warning_dup_map_code     = pdftex_first_integer_code + 28 {suppress warning about duplicated map lines}
- at d pdf_suppress_warning_page_group_code  = pdftex_first_integer_code + 29 {suppress warning about multiple pdfs with page group}
- at d pdf_info_omit_date_code  = pdftex_first_integer_code + 30 {omit generating CreationDate and ModDate}
- at d pdf_suppress_ptex_info_code = pdftex_first_integer_code + 31 {suppress /PTEX.* entries in PDF dictionaries}
- at d pdf_omit_charset_code = pdftex_first_integer_code + 32 {suppress /PTEX.* entries in PDF dictionaries}
- at d pdf_int_pars=pdftex_first_integer_code + 33 {total number of \pdfTeX's integer parameters}
+ at d pdf_major_version_code = pdftex_first_integer_code + 9 {integer part of the PDF version produced}
+ at d pdf_minor_version_code = pdftex_first_integer_code + 10 {fractional part of the PDF version produced}
+ at d pdf_force_pagebox_code = pdftex_first_integer_code + 11 {if the PDF inclusion should always use a specific PDF page box}
+ at d pdf_pagebox_code = pdftex_first_integer_code + 12 {default pagebox to use for PDF inclusion}
+ at d pdf_inclusion_errorlevel_code = pdftex_first_integer_code + 13 {if the PDF inclusion should treat pdfs newer than |pdf_minor_version| as an error}
+ at d pdf_gamma_code            = pdftex_first_integer_code + 14
+ at d pdf_image_gamma_code      = pdftex_first_integer_code + 15
+ at d pdf_image_hicolor_code    = pdftex_first_integer_code + 16
+ at d pdf_image_apply_gamma_code = pdftex_first_integer_code + 17
+ at d pdf_adjust_spacing_code   = pdftex_first_integer_code + 18 {level of spacing adjusting}
+ at d pdf_protrude_chars_code   = pdftex_first_integer_code + 19 {protrude chars at left/right edge of paragraphs}
+ at d pdf_tracing_fonts_code    = pdftex_first_integer_code + 20 {level of font detail in log}
+ at d pdf_objcompresslevel_code = pdftex_first_integer_code + 21 {activate object streams}
+ at d pdf_adjust_interword_glue_code    = pdftex_first_integer_code + 22 {adjust interword glue?}
+ at d pdf_prepend_kern_code     = pdftex_first_integer_code + 23 {prepend kern before certain characters?}
+ at d pdf_append_kern_code      = pdftex_first_integer_code + 24 {append kern before certain characters?}
+ at d pdf_gen_tounicode_code    = pdftex_first_integer_code + 25 {generate ToUnicode for fonts?}
+ at d pdf_draftmode_code        = pdftex_first_integer_code + 26 {switch on draftmode if positive}
+ at d pdf_inclusion_copy_font_code = pdftex_first_integer_code + 27 {generate ToUnicode for fonts?}
+ at d pdf_suppress_warning_dup_dest_code    = pdftex_first_integer_code + 28 {suppress warning about duplicated destinations}
+ at d pdf_suppress_warning_dup_map_code     = pdftex_first_integer_code + 29 {suppress warning about duplicated map lines}
+ at d pdf_suppress_warning_page_group_code  = pdftex_first_integer_code + 30 {suppress warning about multiple pdfs with page group}
+ at d pdf_info_omit_date_code  = pdftex_first_integer_code + 31 {omit generating CreationDate and ModDate}
+ at d pdf_suppress_ptex_info_code = pdftex_first_integer_code + 32 {suppress /PTEX.* entries in PDF dictionaries}
+ at d pdf_omit_charset_code = pdftex_first_integer_code + 33 {suppress /PTEX.* entries in PDF dictionaries}
+ at d pdf_int_pars=pdftex_first_integer_code + 34 {total number of \pdfTeX's integer parameters}
 @#
 @d etex_int_base=pdf_int_pars {base for \eTeX's integer parameters}
 @d tracing_assigns_code=etex_int_base {show assignments}
@@ -5789,6 +5790,7 @@
 @d pdf_unique_resname   == int_par(pdf_unique_resname_code)
 @d pdf_option_always_use_pdfpagebox == int_par(pdf_option_always_use_pdfpagebox_code)
 @d pdf_option_pdf_inclusion_errorlevel == int_par(pdf_option_pdf_inclusion_errorlevel_code)
+ at d pdf_major_version == int_par(pdf_major_version_code)
 @d pdf_minor_version == int_par(pdf_minor_version_code)
 @d pdf_force_pagebox == int_par(pdf_force_pagebox_code)
 @d pdf_pagebox == int_par(pdf_pagebox_code)
@@ -5890,6 +5892,7 @@
 pdf_unique_resname_code:   print_esc("pdfuniqueresname");
 pdf_option_always_use_pdfpagebox_code: print_esc("pdfoptionalwaysusepdfpagebox");
 pdf_option_pdf_inclusion_errorlevel_code: print_esc("pdfoptionpdfinclusionerrorlevel");
+pdf_major_version_code: print_esc("pdfmajorversion");
 pdf_minor_version_code: print_esc("pdfminorversion");
 pdf_force_pagebox_code: print_esc("pdfforcepagebox");
 pdf_pagebox_code: print_esc("pdfpagebox");
@@ -6056,6 +6059,8 @@
 @!@:pdf_option_always_use_pdfpagebox_}{\.{\\pdfoptionalwaysusepdfpagebox} primitive@>
 primitive("pdfoptionpdfinclusionerrorlevel",assign_int,int_base+pdf_option_pdf_inclusion_errorlevel_code);@/
 @!@:pdf_option_pdf_inclusion_errorlevel_}{\.{\\pdfoptionpdfinclusionerrorlevel} primitive@>
+primitive("pdfmajorversion",assign_int,int_base+pdf_major_version_code);@/
+@!@:pdf_major_version_}{\.{\\pdfmajorversion} primitive@>
 primitive("pdfminorversion",assign_int,int_base+pdf_minor_version_code);@/
 @!@:pdf_minor_version_}{\.{\\pdfminorversion} primitive@>
 primitive("pdfforcepagebox",assign_int,int_base+pdf_force_pagebox_code);@/
@@ -15076,6 +15081,7 @@
 pdf_objcompresslevel := 0;
 pdf_decimal_digits := 3;
 pdf_image_resolution := 72;
+pdf_major_version := 1;
 pdf_minor_version := 4;
 pdf_gamma := 1000;
 pdf_image_gamma := 2200;
@@ -15348,9 +15354,10 @@
 @!pdf_gone: longinteger; {number of bytes that were flushed to output}
 @!pdf_save_offset: longinteger; {to save |pdf_offset|}
 @!zip_write_state: integer; {which state of compression we are in}
+@!fixed_pdf_major_version: integer; {fixed major part of the PDF version}
 @!fixed_pdf_minor_version: integer; {fixed minor part of the PDF version}
 @!fixed_pdf_objcompresslevel: integer; {fixed level for activating PDF object streams}
-@!pdf_minor_version_written: boolean; {flag if the PDF version has been written}
+@!pdf_version_written: boolean; {flag if the PDF version has been written}
 @!fixed_pdfoutput: integer; {fixed output format}
 @!fixed_pdfoutput_set: boolean; {|fixed_pdfoutput| has been set?}
 @!fixed_gamma: integer;
@@ -15376,7 +15383,7 @@
 pdf_buf := pdf_op_buf;
 pdf_seek_write_length := false;
 zip_write_state := no_zip;
-pdf_minor_version_written := false;
+pdf_version_written := false;
 fixed_pdfoutput_set := false;
 fixed_pdf_draftmode_set := false;
 
@@ -15392,16 +15399,30 @@
         fix_int := val;
 end;
 
-@ This ensures that |pdfminorversion| is set only before any bytes have
-been written to the generated PDF file. Here also the PDF file is opened
-by |ensure_pdf_open| and the PDF header is written.
+@ This ensures that |pdf_major_version| and |pdf_minor_version| are set
+to reasonable values before any bytes have been written to the generated
+PDF file. We also save their current values in case the user tries to
+change them later, along with |pdf_objcompresslevel|,
+|pdf_image_hicolor|, and various other parameters that must be fixed
+before any PDF output happens.
 
- at p procedure check_pdfminorversion;
+Here also the PDF file is opened by |ensure_pdf_open| and the PDF header
+is written.
+
+ at p procedure check_pdfversion;
 begin
-    if not pdf_minor_version_written then begin
-        pdf_minor_version_written := true;
+    if not pdf_version_written then begin
+        pdf_version_written := true;
+        if pdf_major_version < 1 then begin
+            print_err("pdfTeX error (invalid pdfmajorversion)");
+            print_ln;
+            help2 ("The pdfmajorversion must be 1 or greater.")@/
+                ("I changed this to 1.");
+            int_error (pdf_major_version);
+            pdf_major_version := 1;
+        end;
         if (pdf_minor_version < 0) or (pdf_minor_version > 9) then begin
-            print_err("pdfTeX error (illegal pdfminorversion)");
+            print_err("pdfTeX error (invalid pdfminorversion)");
             print_ln;
             help2 ("The pdfminorversion must be between 0 and 9.")@/
                 ("I changed this to 4.");
@@ -15408,6 +15429,7 @@
             int_error (pdf_minor_version);
             pdf_minor_version := 4;
         end;
+        fixed_pdf_major_version := pdf_major_version;
         fixed_pdf_minor_version := pdf_minor_version;
         fixed_gamma             := fix_int(pdf_gamma, 0, 1000000);
         fixed_image_gamma       := fix_int(pdf_image_gamma, 0, 1000000);
@@ -15416,11 +15438,12 @@
         fixed_pdf_objcompresslevel := fix_int(pdf_objcompresslevel, 0, 3);
         fixed_pdf_draftmode     := fix_int(pdf_draftmode, 0, 1);
         fixed_inclusion_copy_font      := fix_int(pdf_inclusion_copy_font, 0, 1);
-        if (fixed_pdf_minor_version >= 5) and (fixed_pdf_objcompresslevel > 0) then
+        if ((fixed_pdf_major_version > 1) or (fixed_pdf_minor_version >= 5))
+            and (fixed_pdf_objcompresslevel > 0) then
             pdf_os_enable := true
         else begin
             if fixed_pdf_objcompresslevel > 0 then begin
-                pdf_warning("Object streams", "\pdfobjcompresslevel > 0 requires \pdfminorversion > 4. Object streams disabled now.", true, true);
+                pdf_warning("Object streams", "\pdfobjcompresslevel > 0 requires PDF-1.5 or greater. Object streams disabled now.", true, true);
                 fixed_pdf_objcompresslevel := 0;
             end;
             pdf_os_enable := false;
@@ -15427,7 +15450,9 @@
         end;
         ensure_pdf_open;
         fix_pdfoutput;
-        pdf_print("%PDF-1.");
+        pdf_print("%PDF-");
+        pdf_print_int(fixed_pdf_major_version);
+        pdf_print(".");
         pdf_print_int_ln(fixed_pdf_minor_version);
         pdf_print("%");
         pdf_out(208); {'P' + 128}
@@ -15437,9 +15462,10 @@
         pdf_print_nl;
     end
     else begin
-        if fixed_pdf_minor_version <> pdf_minor_version then
+        if (fixed_pdf_minor_version <> pdf_minor_version)
+           or (fixed_pdf_major_version <> pdf_major_version) then
             pdf_error("setup",
-               "\pdfminorversion cannot be changed after data is written to the PDF file");
+        "PDF version cannot be changed after data is written to the PDF file");
     end;
 end;
 
@@ -16769,7 +16795,7 @@
 
 procedure pdf_begin_obj(i: integer; pdf_os_level: integer); {begin a PDF object}
 begin
-    check_pdfminorversion;
+    check_pdfversion;
     pdf_os_prepare_obj(i, pdf_os_level);
     if not pdf_os_mode then begin
         pdf_print_int(i);
@@ -16798,7 +16824,7 @@
 
 procedure pdf_begin_dict(i: integer; pdf_os_level: integer); {begin a PDF dictionary object}
 begin
-    check_pdfminorversion;
+    check_pdfversion;
     pdf_os_prepare_obj(i, pdf_os_level);
     if not pdf_os_mode then begin
         pdf_print_int(i);
@@ -19647,7 +19673,7 @@
 end;
 
 @ @<Initialize variables for \.{PDF} output@>=
-check_pdfminorversion;
+check_pdfversion;
 prepare_mag;
 fixed_decimal_digits := fix_int(pdf_decimal_digits, 0, 4);
 min_bp_val :=
@@ -32999,7 +33025,7 @@
 
 @<Undump pdftex data@>=
 begin
-undumpimagemeta(pdf_minor_version,pdf_inclusion_errorlevel);  {the image information array }
+undumpimagemeta(pdf_major_version,pdf_minor_version,pdf_inclusion_errorlevel);  {the image information array }
 undump_int(pdf_mem_size);
 pdf_mem := xrealloc_array(pdf_mem, integer, pdf_mem_size);
 undump_int(pdf_mem_ptr);
@@ -34358,7 +34384,7 @@
     if pagebox = 0 then {no pagebox specification given}
         pagebox := pdf_box_spec_crop;
     obj_ximage_data(k) := read_image(s, page, named, colorspace, pagebox,
-                                     pdf_minor_version,
+                                     pdf_major_version, pdf_minor_version,
                                      pdf_inclusion_errorlevel);
     if named <> 0 then flush_str(named);
     flush_str(s);
@@ -34371,7 +34397,7 @@
 @ @<Implement \.{\\pdfximage}@>=
 begin
     check_pdfoutput("\pdfximage", true);
-    check_pdfminorversion;
+    check_pdfversion;
     scan_image;
 end
 

Modified: branches/stable/source/src/texk/web2c/pdftexdir/pdftoepdf.cc
===================================================================
--- branches/stable/source/src/texk/web2c/pdftexdir/pdftoepdf.cc	2019-11-23 23:34:02 UTC (rev 816)
+++ branches/stable/source/src/texk/web2c/pdftexdir/pdftoepdf.cc	2019-11-27 22:44:59 UTC (rev 817)
@@ -719,7 +719,7 @@
 
 int
 read_pdf_info(char *image_name, char *page_name, int page_num,
-              int pagebox_spec, int minor_pdf_version_wanted,
+              int pagebox_spec, int major_pdf_version_wanted, int minor_pdf_version_wanted,
               int pdf_inclusion_errorlevel)
 {
     PdfDocument *pdf_doc;
@@ -747,21 +747,21 @@
 #ifdef POPPLER_VERSION
     pdf_major_version_found = pdf_doc->doc->getPDFMajorVersion();
     pdf_minor_version_found = pdf_doc->doc->getPDFMinorVersion();
-    if ((pdf_major_version_found > 1)
+    if ((pdf_major_version_found > major_pdf_version_wanted)
      || (pdf_minor_version_found > minor_pdf_version_wanted)) {
         const char *msg =
-            "PDF inclusion: found PDF version <%d.%d>, but at most version <1.%d> allowed";
+            "PDF inclusion: found PDF version <%d.%d>, but at most version <%d.%d> allowed";
         if (pdf_inclusion_errorlevel > 0) {
-            pdftex_fail(msg, pdf_major_version_found, pdf_minor_version_found, minor_pdf_version_wanted);
+            pdftex_fail(msg, pdf_major_version_found, pdf_minor_version_found, major_pdf_version_wanted, minor_pdf_version_wanted);
         } else if (pdf_inclusion_errorlevel < 0) {
             ; /* do nothing */
         } else { /* = 0, give warning */
-            pdftex_warn(msg, pdf_major_version_found, pdf_minor_version_found, minor_pdf_version_wanted);
+            pdftex_warn(msg, pdf_major_version_found, pdf_minor_version_found, major_pdf_version_wanted, minor_pdf_version_wanted);
         }
     }
 #else
     pdf_version_found = pdf_doc->doc->getPDFVersion();
-    pdf_version_wanted = 1 + (minor_pdf_version_wanted * 0.1);
+    pdf_version_wanted = major_pdf_version_wanted + (minor_pdf_version_wanted * 0.1);
     if (pdf_version_found > pdf_version_wanted + 0.01) {
         char msg[] =
             "PDF inclusion: found PDF version <%.1f>, but at most version <%.1f> allowed";

Modified: branches/stable/source/src/texk/web2c/pdftexdir/ptexlib.h
===================================================================
--- branches/stable/source/src/texk/web2c/pdftexdir/ptexlib.h	2019-11-23 23:34:02 UTC (rev 816)
+++ branches/stable/source/src/texk/web2c/pdftexdir/ptexlib.h	2019-11-27 22:44:59 UTC (rev 817)
@@ -301,13 +301,13 @@
 extern integer getimagegroupref(integer);
 extern void setimagegroupref(integer,integer);
 extern integer readimage(strnumber, integer, strnumber, integer, integer,
-                         integer, integer);
+                         integer, integer, integer);
 extern void deleteimage(integer);
 extern void img_free(void);
 extern void updateimageprocset(integer);
 extern void writeimage(integer);
 extern void dumpimagemeta(void);
-extern void undumpimagemeta(integer, integer);
+extern void undumpimagemeta(integer, integer, integer);
 
 /* writejbig2.c */
 extern void flushjbig2page0objects(void);

Modified: branches/stable/source/src/texk/web2c/pdftexdir/writeimg.c
===================================================================
--- branches/stable/source/src/texk/web2c/pdftexdir/writeimg.c	2019-11-23 23:34:02 UTC (rev 816)
+++ branches/stable/source/src/texk/web2c/pdftexdir/writeimg.c	2019-11-27 22:44:59 UTC (rev 817)
@@ -292,7 +292,7 @@
 
 integer readimage(strnumber s, integer page_num, strnumber page_name,
                   integer colorspace, integer pagebox,
-                  integer pdfversion, integer pdfinclusionerrorlevel)
+                  integer pdfmajorversion, integer pdfminorversion, integer pdfinclusionerrorlevel)
 {
     char *dest = NULL;
     integer img = new_image_entry();
@@ -316,7 +316,7 @@
         pdf_ptr(img) = xtalloc(1, pdf_image_struct);
         pdf_ptr(img)->page_box = pagebox;
         page_num = read_pdf_info(img_name(img), dest, page_num, pagebox,
-                                 pdfversion, pdfinclusionerrorlevel);
+                                 pdfmajorversion, pdfminorversion, pdfinclusionerrorlevel);
         img_width(img) = bp2int(epdf_width);
         img_height(img) = bp2int(epdf_height);
         img_rotate(img) = epdf_rotate;
@@ -341,10 +341,10 @@
         read_jpg_info(img);
         break;
     case IMAGE_TYPE_JBIG2:
-        if (pdfversion < 4) {
+        if (pdfmajorversion == 1 && pdfminorversion < 4) {
             pdftex_fail
                 ("JBIG2 images only possible with at least PDF 1.4; you are generating PDF 1.%i",
-                 (int) pdfversion);
+                 (int) pdfminorversion);
         }
         jbig2_ptr(img) = xtalloc(1, JBIG2_IMAGE_INFO);
         img_type(img) = IMAGE_TYPE_JBIG2;
@@ -507,7 +507,7 @@
     }
 }
 
-void undumpimagemeta(integer pdfversion, integer pdfinclusionerrorlevel)
+void undumpimagemeta(integer pdfmajorversion, integer pdfminorversion, integer pdfinclusionerrorlevel)
 {
     int cur_image, img;
 
@@ -542,7 +542,7 @@
             undumpinteger(pdf_ptr(img)->selected_page);
 
             read_pdf_info(img_name(img), NULL, pdf_ptr(img)->selected_page,
-                          pdf_ptr(img)->page_box, pdfversion,
+                          pdf_ptr(img)->page_box, pdfmajorversion, pdfminorversion,
                           pdfinclusionerrorlevel);
 
             img_width(img) = bp2int(epdf_width);
@@ -562,10 +562,10 @@
             read_jpg_info(img);
             break;
         case IMAGE_TYPE_JBIG2:
-            if (pdfversion < 4) {
+            if (pdfmajorversion == 1 && pdfminorversion < 4) {
                 pdftex_fail
                     ("JBIG2 images only possible with at least PDF 1.4; you are generating PDF 1.%i",
-                     (int) pdfversion);
+                     (int) pdfminorversion);
             }
             jbig2_ptr(img) = xtalloc(1, JBIG2_IMAGE_INFO);
             img_type(img) = IMAGE_TYPE_JBIG2;

Modified: branches/stable/source/src/texk/web2c/pdftexdir/writepng.c
===================================================================
--- branches/stable/source/src/texk/web2c/pdftexdir/writepng.c	2019-11-23 23:34:02 UTC (rev 816)
+++ branches/stable/source/src/texk/web2c/pdftexdir/writepng.c	2019-11-27 22:44:59 UTC (rev 817)
@@ -71,7 +71,7 @@
         pdftex_fail("unsupported type of color_type <%i>",
                     png_get_color_type(png_ptr(img), png_info(img)));
     }
-    if (fixedpdfminorversion >= 4
+    if (fixedpdfmajorversion > 1 || fixedpdfminorversion >= 4
         && (png_get_color_type(png_ptr(img), png_info(img)) == PNG_COLOR_TYPE_GRAY_ALPHA
             || png_get_color_type(png_ptr(img), png_info(img)) == PNG_COLOR_TYPE_RGB_ALPHA)) {
         /* png with alpha channel in device colours; we have to add a Page
@@ -520,7 +520,7 @@
 
     png_get_PLTE(png_ptr(img), png_info(img), &palette, &num_palette);
 
-    if (fixedpdfminorversion < 5)
+    if (fixedpdfmajorversion == 1 && fixedpdfminorversion < 5)
         fixedimagehicolor = 0;
 
     pdf_puts("/Type /XObject\n/Subtype /Image\n");
@@ -530,13 +530,13 @@
         png_copy = false;
     }
     /* alpha channel support */
-    if (fixedpdfminorversion < 4
+    if (fixedpdfmajorversion == 1 && fixedpdfminorversion < 4
         && png_get_color_type(png_ptr(img), png_info(img)) | PNG_COLOR_MASK_ALPHA) {
         png_set_strip_alpha(png_ptr(img));
         png_copy = false;
     }
     /* 16 bit depth support */
-    if (fixedpdfminorversion < 5)
+    if (fixedpdfmajorversion == 1 && fixedpdfminorversion < 5)
         fixedimagehicolor = 0;
     if ((png_get_bit_depth(png_ptr(img), png_info(img)) == 16) && (fixedimagehicolor == 0)) {
         png_set_strip_16(png_ptr(img));
@@ -564,7 +564,7 @@
                (int) png_get_image_height(png_ptr(img), png_info(img)),
                (int) png_get_bit_depth(png_ptr(img), png_info(img)));
     pdf_puts("/ColorSpace ");
-    if (png_copy && fixedpdfminorversion > 1
+    if (png_copy && (fixedpdfmajorversion > 1 || fixedpdfminorversion > 1)
         && png_get_interlace_type(png_ptr(img), png_info(img)) == PNG_INTERLACE_NONE
         && (png_get_color_type(png_ptr(img), png_info(img)) == PNG_COLOR_TYPE_GRAY
             || png_get_color_type(png_ptr(img), png_info(img)) == PNG_COLOR_TYPE_RGB)
@@ -611,8 +611,9 @@
             tex_printf(" *** PNG copy skipped because:");
             if (!png_copy)
                 tex_printf(" !png_copy");
-            if (fixedpdfminorversion <= 1)
-                tex_printf(" minorversion=%d", (int) fixedpdfminorversion);
+            if (fixedpdfmajorversion == 1 && fixedpdfminorversion <= 1)
+                tex_printf(" minorversion=%d (and majorversion=1)",
+                           (int) fixedpdfminorversion);
             if (png_get_interlace_type(png_ptr(img), png_info(img)) != PNG_INTERLACE_NONE)
                 tex_printf(" interlaced");
             if (!((png_get_color_type(png_ptr(img), png_info(img)) == PNG_COLOR_TYPE_GRAY)
@@ -648,7 +649,7 @@
             write_png_gray(img);
             break;
         case PNG_COLOR_TYPE_GRAY_ALPHA:
-            if (fixedpdfminorversion >= 4) {
+            if (fixedpdfminorversion >= 4 || fixedpdfmajorversion > 1) {
                 write_png_gray_alpha(img);
                 last_png_needs_page_group = true;
             } else
@@ -658,7 +659,7 @@
             write_png_rgb(img);
             break;
         case PNG_COLOR_TYPE_RGB_ALPHA:
-            if (fixedpdfminorversion >= 4) {
+            if (fixedpdfminorversion >= 4 || fixedpdfmajorversion > 1) {
                 write_png_rgb_alpha(img);
                 last_png_needs_page_group = true;
             } else

Index: branches/stable/tests/12-pdf2
===================================================================
--- branches/stable/tests/12-pdf2	2019-11-23 23:34:02 UTC (rev 816)
+++ branches/stable/tests/12-pdf2	2019-11-27 22:44:59 UTC (rev 817)

Property changes on: branches/stable/tests/12-pdf2
___________________________________________________________________
Added: svn:ignore
## -0,0 +1 ##
+*.pdf
Added: branches/stable/tests/12-pdf2/Makefile
===================================================================
--- branches/stable/tests/12-pdf2/Makefile	                        (rev 0)
+++ branches/stable/tests/12-pdf2/Makefile	2019-11-27 22:44:59 UTC (rev 817)
@@ -0,0 +1,49 @@
+# $Id$
+# Public domain.
+# Test \pdfmajorversion and image inclusion.
+
+include ../Common.mak
+
+default: test-compress test-badver test-pdfmajor test-incl
+
+test-compress: test-compress2.tex
+	$(prog) $<
+	! grep "warning.*Object streams" test-compress2.log >/dev/null
+
+test-badver: test-pdfmajor.tex
+	! $(prog) '\pdfmajorversion=0 \input $<'
+	! $(prog) '\pdfminorversion=-1 \input $<\end'
+
+test-pdfmajor: test-pdfmajor.tex
+	$(prog) $<
+	# by default, first line should start with %PDF-1.
+	sed 1q test-pdfmajor.pdf | grep "%PDF-1" >/dev/null
+	#
+	# go to PDF 2.
+	$(prog) '\pdfmajorversion=2 \input $<'
+	sed 1q test-pdfmajor.pdf | grep "%PDF-2" >/dev/null
+
+test-incl: test-incl22 test-incl21 test-incl12
+#
+test-incl22: test-doc2incl2.tex incl2.pdf
+	$(prog) $< # no pdftex warning
+	! grep "at most version <" test-doc2incl2.log >/dev/null
+
+test-incl21: test-doc2incl1.tex incl1.pdf
+	$(prog) $< # no pdftex warning
+	! grep "at most version <" test-doc2incl1.log >/dev/null
+
+test-incl12: test-doc1incl2.tex incl2.pdf
+	$(prog) $< # pdftex warning should be in the log
+	grep "at most version <" test-doc1incl2.log >/dev/null
+	# 
+	# Now let's force omission of the warning.
+	$(prog) '\pdfinclusionerrorlevel=-1 \input $<'
+	! grep "at most version <" test-doc1incl2.log >/dev/null
+
+incl2.pdf: incl2.tex
+	$(prog) incl2.tex
+incl1.pdf: incl1.tex
+	$(prog) incl1.tex
+clean:
+	$(clean)


Property changes on: branches/stable/tests/12-pdf2/Makefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision
\ No newline at end of property
Added: branches/stable/tests/12-pdf2/incl1.tex
===================================================================
--- branches/stable/tests/12-pdf2/incl1.tex	                        (rev 0)
+++ branches/stable/tests/12-pdf2/incl1.tex	2019-11-27 22:44:59 UTC (rev 817)
@@ -0,0 +1,7 @@
+% $Id$
+% Public domain.
+% Trivial PDF-1 file, with default pdf version.
+\pdfcompresslevel=0 \pdfobjcompresslevel=0 % get greppable output
+\pdfoutput=1
+\hrule width1pt height1pt depth0pt
+\end


Property changes on: branches/stable/tests/12-pdf2/incl1.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision
\ No newline at end of property
Added: branches/stable/tests/12-pdf2/incl2.tex
===================================================================
--- branches/stable/tests/12-pdf2/incl2.tex	                        (rev 0)
+++ branches/stable/tests/12-pdf2/incl2.tex	2019-11-27 22:44:59 UTC (rev 817)
@@ -0,0 +1,13 @@
+% $Id$
+% Public domain.
+% Trivial PDF-2 file.
+\pdfcompresslevel=0 \pdfobjcompresslevel=0 % get greppable output
+\pdfoutput=1
+
+% let's make a 2.0 document, since that is what is needed in practice.
+% The default would be 2.4, since \pdfminorversion is 4 (from 1.4).
+\pdfmajorversion=2 \pdfminorversion=0
+
+% typeset something.
+\hrule width1pt height1pt depth0pt
+\end


Property changes on: branches/stable/tests/12-pdf2/incl2.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision
\ No newline at end of property
Added: branches/stable/tests/12-pdf2/test-compress2.tex
===================================================================
--- branches/stable/tests/12-pdf2/test-compress2.tex	                        (rev 0)
+++ branches/stable/tests/12-pdf2/test-compress2.tex	2019-11-27 22:44:59 UTC (rev 817)
@@ -0,0 +1,12 @@
+% $Id$
+% Public domain.
+% Check that PDF 2.0 allows object compression.
+% 
+% We should also check \pdfimagehicolor, but since its setting and
+% resetting depending on version is silent, too painful.
+% 
+\pdfoutput=1
+\pdfmajorversion=2 \pdfminorversion=0
+\pdfobjcompresslevel=2
+\hrule width1pt height1pt depth0pt
+\end


Property changes on: branches/stable/tests/12-pdf2/test-compress2.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision
\ No newline at end of property
Added: branches/stable/tests/12-pdf2/test-doc1incl2.tex
===================================================================
--- branches/stable/tests/12-pdf2/test-doc1incl2.tex	                        (rev 0)
+++ branches/stable/tests/12-pdf2/test-doc1incl2.tex	2019-11-27 22:44:59 UTC (rev 817)
@@ -0,0 +1,9 @@
+% $Id$
+% Public domain.
+% PDF1 document, include PDF2 image.
+\pdfcompresslevel=0 \pdfobjcompresslevel=0 % get greppable output
+\pdfoutput=1
+\catcode`\{=1 \catcode`\}=2
+\pdfximage{incl2.pdf}
+\hbox{\pdfrefximage\pdflastximage}
+\end


Property changes on: branches/stable/tests/12-pdf2/test-doc1incl2.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision
\ No newline at end of property
Added: branches/stable/tests/12-pdf2/test-doc2incl1.tex
===================================================================
--- branches/stable/tests/12-pdf2/test-doc2incl1.tex	                        (rev 0)
+++ branches/stable/tests/12-pdf2/test-doc2incl1.tex	2019-11-27 22:44:59 UTC (rev 817)
@@ -0,0 +1,10 @@
+% $Id$
+% Public domain.
+% PDF2 document, include PDF1 image.
+\pdfcompresslevel=0 \pdfobjcompresslevel=0 % get greppable output
+\pdfoutput=1
+\pdfmajorversion=2 \pdfminorversion=0
+\catcode`\{=1 \catcode`\}=2
+\pdfximage{incl1.pdf}
+\hbox{\pdfrefximage\pdflastximage}
+\end


Property changes on: branches/stable/tests/12-pdf2/test-doc2incl1.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision
\ No newline at end of property
Added: branches/stable/tests/12-pdf2/test-doc2incl2.tex
===================================================================
--- branches/stable/tests/12-pdf2/test-doc2incl2.tex	                        (rev 0)
+++ branches/stable/tests/12-pdf2/test-doc2incl2.tex	2019-11-27 22:44:59 UTC (rev 817)
@@ -0,0 +1,10 @@
+% $Id$
+% Public domain.
+% PDF2 document, include PDF2 image.
+\pdfcompresslevel=0 \pdfobjcompresslevel=0 % get greppable output
+\pdfoutput=1
+\pdfmajorversion=2 \pdfminorversion=0
+\catcode`\{=1 \catcode`\}=2
+\pdfximage{incl2.pdf}
+\hbox{\pdfrefximage\pdflastximage}
+\end


Property changes on: branches/stable/tests/12-pdf2/test-doc2incl2.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision
\ No newline at end of property
Added: branches/stable/tests/12-pdf2/test-pdfmajor.tex
===================================================================
--- branches/stable/tests/12-pdf2/test-pdfmajor.tex	                        (rev 0)
+++ branches/stable/tests/12-pdf2/test-pdfmajor.tex	2019-11-27 22:44:59 UTC (rev 817)
@@ -0,0 +1,7 @@
+% $Id$
+% Public domain.
+% Leave \pdfmajorversion unset, so it can be set on the command line.
+\pdfcompresslevel=0 \pdfobjcompresslevel=0 % get greppable output
+\pdfoutput=1
+\hrule width1pt height1pt depth0pt
+\end


Property changes on: branches/stable/tests/12-pdf2/test-pdfmajor.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision
\ No newline at end of property


More information about the pdftex-commits mailing list