[XeTeX] XeTeX : request for enhancement
David Carlisle
d.p.carlisle at gmail.com
Mon Oct 16 13:38:52 CEST 2023
On Sun, 15 Oct 2023 at 19:49, Philip Taylor <
Philip.Taylor at 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]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/xetex/attachments/20231016/eab10138/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 22123 bytes
Desc: not available
URL: <https://tug.org/pipermail/xetex/attachments/20231016/eab10138/attachment-0001.png>
More information about the XeTeX
mailing list.