On Sun, 15 Sep 2024, Bruce Horrocks wrote:

> 
> 
> > On 15 Sep 2024, at 16:56, Alan Caruanambo <alan.caruanam...@gmail.com> 
> > wrote:
> > 
> > Hello, basically my question is to know if there is a way to use ConTeXt to 
> > perform the functions that pdfcrop does.
> > 
> > pdfcrop: A Perl script that can either trim pages of any whitespace border, 
> > or trim them of a fixed border  
> 
> The \clip command works on a PDF file.
> 
> <https://wiki.contextgarden.net/Command/clip>
> 
> But you need to give it exact measurements.

There is an old perl script `pdftrimwhite` which will do the calculations for 
you.

    mtxrun --script pdftrimwhite 

I hadn't used it for a while and I tried it and it fails because it is still 
calling context using texexec:

sub RunTeX
  { if ($UsePlain)
      { $result = `pdftex -prog=pdftex -fmt=plain -int=batchmode $tempfile` }
    else
      { $result = `texexec --batch --once --purge $tempfile` }
    print $result if $Verbose ; $results .= "$result\n" }


I suspect that changing `texexec` to `context` should make it work with the 
current installation as well. 

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

Reply via email to