* [NTG-context] pdfcrop with context
@ 2024-09-15 15:56 Alan Caruanambo
2024-09-15 20:52 ` [NTG-context] " Bruce Horrocks
0 siblings, 1 reply; 3+ messages in thread
From: Alan Caruanambo @ 2024-09-15 15:56 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 225 bytes --]
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
[-- Attachment #1.2: Type: text/html, Size: 297 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
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: pdfcrop with context
2024-09-15 15:56 [NTG-context] pdfcrop with context Alan Caruanambo
@ 2024-09-15 20:52 ` Bruce Horrocks
2024-09-17 13:40 ` Aditya Mahajan
0 siblings, 1 reply; 3+ messages in thread
From: Bruce Horrocks @ 2024-09-15 20:52 UTC (permalink / raw)
To: ntg-context mailing list
> On 15 Sep 2024, at 16:56, Alan Caruanambo <alan.caruanambom@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.
—
Bruce Horrocks
Hampshire, UK
___________________________________________________________________________________
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: pdfcrop with context
2024-09-15 20:52 ` [NTG-context] " Bruce Horrocks
@ 2024-09-17 13:40 ` Aditya Mahajan
0 siblings, 0 replies; 3+ messages in thread
From: Aditya Mahajan @ 2024-09-17 13:40 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Sun, 15 Sep 2024, Bruce Horrocks wrote:
>
>
> > On 15 Sep 2024, at 16:56, Alan Caruanambo <alan.caruanambom@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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-09-17 13:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-15 15:56 [NTG-context] pdfcrop with context Alan Caruanambo
2024-09-15 20:52 ` [NTG-context] " Bruce Horrocks
2024-09-17 13:40 ` 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).