[question] \clipping some data from a pdf
Does anyone know? Using the latest LMTX, i try to clip some portion of an external pdf page, then resize that portion on top a new page. i use the \clip command. \starttext \scale[width=100mm, hwight=100mm]{\clip[width=150mm, height=120mm, hoffset=30mm, voffset=40mm]{\externalfigure[drawing.pdf]}} % incorrect \scale[width=100mm, hwight=100mm]{\clip[width=150mm, height=120mm, hoffset=30mm, voffset=136mm]{\externalfigure[drawing.pdf]}} % correct \stoptext I noticed that the voffset parameter *always* counts from the top/left of the external source. Also if the source has its origin defined at the lower/left corner. Is that intentional? It is confusing as when i place a rectangle on top of the clip i want to extract from the source pdf, the x,w,w,h of that rectangle will not match the parameter needed for the \clip command. Or does there happen to be some snazzy tool out there to get the coordinates of embedden images within a pdf? .Floris
Am 2020-01-29 um 00:27 schrieb Floris van Manen
: Or does there happen to be some snazzy tool out there to get the coordinates of embedden images within a pdf?
In case the "right" size of your image is defined as one of the PDF boxes (MediaBox, TrimBox, CropBox, ArtBox), you can set \externalfigure[drawing][size=art] (size=none/media/crop/trim/art). Best, Hraban
On Wed, 29 Jan 2020, Henning Hraban Ramm wrote:
Am 2020-01-29 um 00:27 schrieb Floris van Manen
: Or does there happen to be some snazzy tool out there to get the coordinates of embedden images within a pdf? In case the "right" size of your image is defined as one of the PDF boxes (MediaBox, TrimBox, CropBox, ArtBox), you can set \externalfigure[drawing][size=art] (size=none/media/crop/trim/art).
This was documented at https://www.contextgarden.net/Command/useexternalfigure but I also added a short description at https://www.contextgarden.net/Using_Graphics Aditya
participants (3)
-
Aditya Mahajan
-
Floris van Manen
-
Henning Hraban Ramm