ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Floris van Manen <vm@klankschap.nl>
To: ntg-context@ntg.nl
Subject: [question] \clipping some data from a pdf
Date: Wed, 29 Jan 2020 00:27:06 +0100	[thread overview]
Message-ID: <01c5a9b4-f893-64bc-a3fd-2e105bf1d573@klankschap.nl> (raw)

[-- 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
___________________________________________________________________________________

             reply	other threads:[~2020-01-28 23:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-28 23:27 Floris van Manen [this message]
2020-01-29  6:04 ` Henning Hraban Ramm
2020-01-30 13:55   ` Aditya Mahajan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=01c5a9b4-f893-64bc-a3fd-2e105bf1d573@klankschap.nl \
    --to=vm@klankschap.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).