ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] hard clipping in ConTeXt?
@ 2023-11-10 17:17 Pablo Rodriguez via ntg-context
  2023-11-11 10:02 ` [NTG-context] " Hans Hagen via ntg-context
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2023-11-10 17:17 UTC (permalink / raw)
  To: ConTeXt users; +Cc: Pablo Rodriguez

Dear list,

I have the following sample:

  \setuplayout[page]
  \starttext
    \clip[hoffset=5mm, voffset=5mm, width=15mm, height=15mm]
        {\externalfigure[xml-mkiv.pdf]}
  \stopnotmode
  \stoptext

Using PDF.js (from current Firefox), xpdf, Evince, mupdf-gl, the viewer
is able to find "dealing", altough it cannot be displayed.

Okular and Sumatra (with Wine in Linux) are not able to find "dealing".

Is there any way to have a hard clipping in ConTeXt?

I mean, that only the contents of the clipped section is added to the
resulting PDF document?

Many thanks for your help,

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: hard clipping in ConTeXt?
  2023-11-10 17:17 [NTG-context] hard clipping in ConTeXt? Pablo Rodriguez via ntg-context
@ 2023-11-11 10:02 ` Hans Hagen via ntg-context
  2023-11-13 16:20   ` Pablo Rodriguez via ntg-context
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen via ntg-context @ 2023-11-11 10:02 UTC (permalink / raw)
  To: Pablo Rodriguez via ntg-context; +Cc: Hans Hagen

On 11/10/2023 6:17 PM, Pablo Rodriguez via ntg-context wrote:
> Dear list,
> 
> I have the following sample:
> 
>    \setuplayout[page]
>    \starttext
>      \clip[hoffset=5mm, voffset=5mm, width=15mm, height=15mm]
>          {\externalfigure[xml-mkiv.pdf]}
>    \stopnotmode
>    \stoptext
> 
> Using PDF.js (from current Firefox), xpdf, Evince, mupdf-gl, the viewer
> is able to find "dealing", altough it cannot be displayed.
> 
> Okular and Sumatra (with Wine in Linux) are not able to find "dealing".
> 
> Is there any way to have a hard clipping in ConTeXt?
> 
> I mean, that only the contents of the clipped section is added to the
> resulting PDF document?

one has to render a document (page stream) in order to wee what end up 
where .. a viewer has that info so it can decide to act upon it (apart 
from some gambling with words clipped in the middle of a character)

this is not something for context to provide (it would mean keeping 
track of what gets clipped, and then compensating for it because it can 
still contribute to placement of following stuff, and then how about 
half clipped stuff)

if i had a lifespan of 1000 years or were on a boring trip to another 
planet it might make a nice (although pointless) challenge to keep me 
occupied

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: hard clipping in ConTeXt?
  2023-11-11 10:02 ` [NTG-context] " Hans Hagen via ntg-context
@ 2023-11-13 16:20   ` Pablo Rodriguez via ntg-context
  0 siblings, 0 replies; 3+ messages in thread
From: Pablo Rodriguez via ntg-context @ 2023-11-13 16:20 UTC (permalink / raw)
  To: Hans Hagen via ntg-context; +Cc: Pablo Rodriguez

On 11/11/23 11:02, Hans Hagen via ntg-context wrote:
> On 11/10/2023 6:17 PM, Pablo Rodriguez via ntg-context wrote:
>> [...]
>> Is there any way to have a hard clipping in ConTeXt?
>>
>> I mean, that only the contents of the clipped section is added to the
>> resulting PDF document?
>
> one has to render a document (page stream) in order to wee what end up
> where .. a viewer has that info so it can decide to act upon it (apart
> from some gambling with words clipped in the middle of a character)
>
> this is not something for context to provide (it would mean keeping
> track of what gets clipped, and then compensating for it because it can
> still contribute to placement of following stuff, and then how about
> half clipped stuff)

Many thanks for your reply, Hans.

Now it is clear to me that what I asked is too complex to be achieved
with ConTeXt (since it is mainly outside its scope).

> if i had a lifespan of 1000 years or were on a boring trip to another
> planet it might make a nice (although pointless) challenge to keep me
> occupied

From the user perspective, it is important to know that the full page is
included in the document (which may lead to unintended consequences).

I have accidentally discovered this myself the other day and I’m going
to check the wiki to add this information (if not included).

Many thanks for your help,

Pablo

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

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2023-11-13 16:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-10 17:17 [NTG-context] hard clipping in ConTeXt? Pablo Rodriguez via ntg-context
2023-11-11 10:02 ` [NTG-context] " Hans Hagen via ntg-context
2023-11-13 16:20   ` Pablo Rodriguez via ntg-context

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).