| 1 |
% !Mode:: "TeX:UTF-8:Main" |
| 2 |
% The next command needs LaTeX 2022-06-01, for older formats see documentation |
| 3 |
% of pdfmanagement-testphase |
| 4 |
\RequirePackage{pdfmanagement} |
| 5 |
\documentclass{article} |
| 6 |
|
| 7 |
\usepackage{pdfpages,xcolor} |
| 8 |
|
| 9 |
\usepackage{hyperref} |
| 10 |
\hypersetup{linkbordercolor=blue} |
| 11 |
|
| 12 |
\usepackage{newpax} |
| 13 |
|
| 14 |
%use the link border color and style of the imported pdf |
| 15 |
%and not hyperref colors |
| 16 |
\newpaxsetup{usefileattributes=true} |
| 17 |
|
| 18 |
\begin{document} |
| 19 |
|
| 20 |
\includegraphics[scale=0.5,trim=4cm 15cm 8cm 3cm,clip,page=1]{doc-input1} |
| 21 |
\includegraphics[scale=0.5,trim=5cm 15cm 8cm 3cm,clip,page=2]{doc-input1} |
| 22 |
|
| 23 |
%set a unique suffix if the pdf is imported twice |
| 24 |
\newpaxsetup{destsuffix=B} |
| 25 |
\includegraphics[scale=0.5,trim=4cm 15cm 8cm 3cm,clip,page=1]{doc-input1} |
| 26 |
\includegraphics[scale=0.5,trim=5cm 15cm 8cm 3cm,clip,page=2]{doc-input1} |
| 27 |
|
| 28 |
% suppress the adding of annotations |
| 29 |
\newpaxsetup{addannots=false} |
| 30 |
\includegraphics[scale=0.5,trim=4cm 15cm 8cm 3cm,clip,page=1]{doc-input1} |
| 31 |
|
| 32 |
%reactivate, don't use file attributes |
| 33 |
\newpaxsetup{addannots=true,usefileattributes=false} |
| 34 |
\includepdf[pages=-]{doc-input2} |
| 35 |
\end{document} |