| 1 |
% $Id$ |
| 2 |
% Public domain. From Max Chernoff. |
| 3 |
% https://tex.stackexchange.com/questions/734919 |
| 4 |
|
| 5 |
\catcode`\{=1 \catcode`\}=2 |
| 6 |
\output={\global\advance\count0 by 1 \shipout\box255 } |
| 7 |
\pdfoutput=1 |
| 8 |
\hsize=6.5in \vsize=11in |
| 9 |
\pdfpagewidth=\hsize \pdfpageheight=\vsize |
| 10 |
\def\eject{\par \penalty-10000 } |
| 11 |
|
| 12 |
\def\loggingall{\tracingcommands2\tracingstats2 |
| 13 |
\tracingpages1\tracingoutput1\tracinglostchars1 |
| 14 |
\tracingmacros2\tracingparagraphs1\tracingrestores1 |
| 15 |
\showboxbreadth1073741823 \showboxdepth1073741823 |
| 16 |
}% |
| 17 |
%\loggingall |
| 18 |
|
| 19 |
%% Generate images with ImageMagick: |
| 20 |
%% for n in $(seq 1 6); do |
| 21 |
%% convert -units PixelsPerInch -size 1000x1000 xc:#ff0000 -density $n test-$n.jpg |
| 22 |
%% done |
| 23 |
|
| 24 |
% because these are zero height, they all come out on the same page? |
| 25 |
\pdfximage{test-1.jpg}\pdfrefximage\pdflastximage\eject |
| 26 |
\pdfximage{test-2.jpg}\pdfrefximage\pdflastximage\eject |
| 27 |
\pdfximage{test-3.jpg}\pdfrefximage\pdflastximage\eject |
| 28 |
\pdfximage{test-4.jpg}\pdfrefximage\pdflastximage\eject |
| 29 |
\pdfximage{test-5.jpg}\pdfrefximage\pdflastximage\eject |
| 30 |
\pdfximage{test-6.jpg}\pdfrefximage\pdflastximage\eject |
| 31 |
\end |
| 32 |
|
| 33 |
%\input graphicx |
| 34 |
%\includegraphics{test-1.jpg} |
| 35 |
%\end |
| 36 |
|
| 37 |
% luatex equivalents (from luatex85.sty) |
| 38 |
%\let\pdfximage \saveimageresource |
| 39 |
%\let\pdflastximage \lastsavedimageresourceindex |
| 40 |
%\let\pdflastximagepages \lastsavedimageresourcepages |
| 41 |
%\let\pdfrefximage \useimageresource |
| 42 |
|
| 43 |
%\documentclass{article} |
| 44 |
%\usepackage{graphicx} |
| 45 |
%\begin{document} |
| 46 |
%\includegraphics{test-1.jpg} |
| 47 |
%\end{document} |
| 48 |
|