ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [question] \clipping some data from a pdf
@ 2020-01-28 23:27 Floris van Manen
  2020-01-29  6:04 ` Henning Hraban Ramm
  0 siblings, 1 reply; 3+ messages in thread
From: Floris van Manen @ 2020-01-28 23:27 UTC (permalink / raw)
  To: ntg-context

[-- Attachment #1: Type: text/plain, Size: 988 bytes --]

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


[-- Attachment #2: pEpkey.asc --]
[-- Type: application/pgp-keys, Size: 2497 bytes --]

[-- Attachment #3: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-30 13:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-28 23:27 [question] \clipping some data from a pdf Floris van Manen
2020-01-29  6:04 ` Henning Hraban Ramm
2020-01-30 13:55   ` Aditya Mahajan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).