On Sun, 15 Sep 2024, Bruce Horrocks wrote:
On 15 Sep 2024, at 16:56, Alan Caruanambo
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