diff options
Diffstat (limited to 'Master/texmf-dist/doc/pdftex/tests/12-pdf2')
8 files changed, 117 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/pdftex/tests/12-pdf2/Makefile b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/Makefile new file mode 100644 index 00000000000..46525f91ecf --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/Makefile @@ -0,0 +1,49 @@ +# $Id: Makefile 817 2019-11-27 22:44:59Z karl $ +# 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) diff --git a/Master/texmf-dist/doc/pdftex/tests/12-pdf2/incl1.tex b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/incl1.tex new file mode 100644 index 00000000000..b3adc3e5da1 --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/incl1.tex @@ -0,0 +1,7 @@ +% $Id: incl1.tex 817 2019-11-27 22:44:59Z karl $ +% Public domain. +% Trivial PDF-1 file, with default pdf version. +\pdfcompresslevel=0 \pdfobjcompresslevel=0 % get greppable output +\pdfoutput=1 +\hrule width1pt height1pt depth0pt +\end diff --git a/Master/texmf-dist/doc/pdftex/tests/12-pdf2/incl2.tex b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/incl2.tex new file mode 100644 index 00000000000..5937a218e2a --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/incl2.tex @@ -0,0 +1,13 @@ +% $Id: incl2.tex 817 2019-11-27 22:44:59Z karl $ +% 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 diff --git a/Master/texmf-dist/doc/pdftex/tests/12-pdf2/test-compress2.tex b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/test-compress2.tex new file mode 100644 index 00000000000..00c528caedb --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/test-compress2.tex @@ -0,0 +1,12 @@ +% $Id: test-compress2.tex 817 2019-11-27 22:44:59Z karl $ +% 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 diff --git a/Master/texmf-dist/doc/pdftex/tests/12-pdf2/test-doc1incl2.tex b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/test-doc1incl2.tex new file mode 100644 index 00000000000..4fd77c5c97f --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/test-doc1incl2.tex @@ -0,0 +1,9 @@ +% $Id: test-doc1incl2.tex 817 2019-11-27 22:44:59Z karl $ +% 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 diff --git a/Master/texmf-dist/doc/pdftex/tests/12-pdf2/test-doc2incl1.tex b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/test-doc2incl1.tex new file mode 100644 index 00000000000..c674ca37337 --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/test-doc2incl1.tex @@ -0,0 +1,10 @@ +% $Id: test-doc2incl1.tex 817 2019-11-27 22:44:59Z karl $ +% 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 diff --git a/Master/texmf-dist/doc/pdftex/tests/12-pdf2/test-doc2incl2.tex b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/test-doc2incl2.tex new file mode 100644 index 00000000000..ca2bb58b29b --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/test-doc2incl2.tex @@ -0,0 +1,10 @@ +% $Id: test-doc2incl2.tex 817 2019-11-27 22:44:59Z karl $ +% 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 diff --git a/Master/texmf-dist/doc/pdftex/tests/12-pdf2/test-pdfmajor.tex b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/test-pdfmajor.tex new file mode 100644 index 00000000000..797a0e00c71 --- /dev/null +++ b/Master/texmf-dist/doc/pdftex/tests/12-pdf2/test-pdfmajor.tex @@ -0,0 +1,7 @@ +% $Id: test-pdfmajor.tex 817 2019-11-27 22:44:59Z karl $ +% 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 |