On Sun, 15 Oct 2023 at 19:49, Philip Taylor <
philip.tay...@hellenic-institute.uk> wrote:

> At the moment, one can include a PDF file using the following syntax :
>
> \XeTeXpdffile ⟨filename⟩ [ page ⟨int⟩ ] [ crop | media | bleed | trim |
> art ]
> [ scaled ⟨int⟩ | xscaled ⟨int⟩ | yscaled ⟨int⟩ | width ⟨dimen⟩ |
> height ⟨dimen⟩ | rotated ⟨decimal⟩ ]
> Insert (pages of) a PDF. See below for explanation
>
> where [ crop | media | bleed | trim | art ] 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 :
>
> \XeTeXpdffile ⟨filename⟩ [ page ⟨int⟩ ] [ crop | media | bleed | trim |
> art | custom [xmin ymin xmax ymax]]
> [ scaled ⟨int⟩ | xscaled ⟨int⟩ | yscaled ⟨int⟩ | width ⟨dimen⟩ |
> height ⟨dimen⟩ | rotated ⟨decimal⟩ ]
> Insert (pages of) a PDF. See below for explanation
>
> --
> *Philip Taylor*
>


You can clip an arbitrary box so no need to have this as an image inclusion
feature.


\input{graphicx}

\includegraphics{example-image.pdf}

\bigskip

\includegraphics[trim=20pt 50pt 50pt 100pt, clip]{example-image.pdf}

\bye


Produces this (with plain xetex, for you)

[image: image.png]

Reply via email to