<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 15 Oct 2023 at 19:49, Philip Taylor <<a href="mailto:Philip.Taylor@hellenic-institute.uk">Philip.Taylor@hellenic-institute.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
At the moment, one can include a PDF file using the following syntax
:<br>
<blockquote><tt>\XeTeXpdffile ⟨filename⟩ [ page ⟨int⟩ ] [ crop |
media | bleed | trim | art ]</tt><br>
<tt>[ scaled ⟨int⟩ | xscaled ⟨int⟩ | yscaled ⟨int⟩ | width ⟨dimen⟩
|</tt><br>
<tt>height ⟨dimen⟩ | rotated ⟨decimal⟩ ]</tt><br>
<tt>Insert (pages of) a PDF. See below for explanation</tt><br>
</blockquote>
where <tt>[ crop | media | bleed | trim | art ] </tt>specify to
which of the four boxes known to PDF the inserted file is to be
cropped. I frequently have the need to crop a PDF file during
inclusion to arbitrary dimensions, but at the moment that would
appear to be impossible (short of pre-massaging the PDF to be
inserted). Would it be possible to enhance XeTeX to recognise and
honour the following (or similar) syntax :<br>
<blockquote><tt>\XeTeXpdffile ⟨filename⟩ [ page ⟨int⟩ ] [ crop |
media | bleed | trim | art | custom [xmin ymin xmax ymax]]</tt><br>
<tt>
[ scaled ⟨int⟩ | xscaled ⟨int⟩ | yscaled ⟨int⟩ | width ⟨dimen⟩ |</tt><br>
<tt>
height ⟨dimen⟩ | rotated ⟨decimal⟩ ]</tt><br>
<tt>
Insert (pages of) a PDF. See below for explanation<br>
</tt></blockquote>
-- <br>
<i>Philip Taylor</i></div></blockquote><div><br></div><div><br></div><div>You can clip an arbitrary box so no need to have this as an image inclusion feature.</div><div><br></div><div><br></div><div>\input{graphicx}<br><br>\includegraphics{example-image.pdf}<br><br>\bigskip<br><br>\includegraphics[trim=20pt 50pt 50pt 100pt, clip]{example-image.pdf}<br><br>\bye</div><div><br></div><div><br></div><div>Produces this (with plain xetex, for you)<br></div><div><br></div><div><img src="cid:ii_lnstmqsf0" alt="image.png" width="498" height="516"><br><br></div><div><br></div><div> <br></div></div></div>