| 1 |
% !Mode:: "TeX:UTF-8:Main" |
| 2 |
\documentclass{article} |
| 3 |
\usepackage{ifluatex,etoolbox} |
| 4 |
\usepackage{pdfpages} |
| 5 |
%pax needs this to run with lualatex |
| 6 |
\ifluatex |
| 7 |
\usepackage{pdftexcmds} |
| 8 |
\makeatletter |
| 9 |
\let\pdfstrcmp\pdf@strcmp |
| 10 |
\let\pdfescapename\pdf@escapename |
| 11 |
\makeatother |
| 12 |
\usepackage{luatex85} |
| 13 |
\fi |
| 14 |
%load pax |
| 15 |
\usepackage{pax} |
| 16 |
%correct a bug in pax affecting clipping |
| 17 |
\makeatletter |
| 18 |
\patchcmd\PAX@pdf@annot{\PAX@pagellx}{\PAX@page@llx}{}{\fail} |
| 19 |
%allow hashes and percent in the pax file |
| 20 |
\patchcmd\PAX@AddAnnots{\InputIfFileExists\PAX@file{}{\typeout{* Missing: \PAX@file}}} |
| 21 |
{\begingroup \catcode`\#=12 \catcode`\%=12 |
| 22 |
\InputIfFileExists\PAX@file{}{\typeout{* Missing: \PAX@file}}\endgroup}{}{\fail} |
| 23 |
\makeatother |
| 24 |
\begin{document} |
| 25 |
\includegraphics[scale=0.5,trim=5cm 15cm 8cm 3cm,clip,page=2]{doc-input1} |
| 26 |
\includegraphics[scale=0.5,trim=5cm 15cm 8cm 3cm,clip,page=1]{doc-input1} |
| 27 |
|
| 28 |
\includepdf[pages=-]{doc-input2} |
| 29 |
\end{document} |