ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Using texexec to prepare single-sided PDF for double-sided printing
Date: Mon, 23 Feb 2009 18:51:09 +0100	[thread overview]
Message-ID: <D1BB1991-78A5-495B-8FE0-271D990EE555@gmail.com> (raw)
In-Reply-To: <87ocwt84q3.fsf@cordelia.devereux.me.uk>


Am 23.02.2009 um 18:04 schrieb John Devereux:

> Wolfgang Schuster <schuster.wolfgang@googlemail.com> writes:
>
>> Am 22.02.2009 um 16:00 schrieb John Devereux:
>>
>>> I would like to use texexec to post-process a large pdf file, so  
>>> as to
>>> prepare it for double sided printing. The existing file has a large
>>> left hand "margin" on each page, so as to allow binding.
>>>
>>> I would like to change this so that odd (right) pages have a large
>>> left margin, and even (left) pages a large right margin.
>>
>> \setuppagenumbering[alternative=doublesided]
>> \setuplayout[horoffset=1cm]
>> \setuplayout[page]
>> \starttext
>> \copypages[document]
>> \stoptext
>
> Thanks, that's great!
>
> Is there an easy way to compensate for the original offset? The
> original pdf has a large left margin and a small right one.


Replace 'page' with the name of your document.

\setuplayout[page]

\starttext

\getfiguredimensions[pages]

\dorecurse\noffigurepages
   {\hbox to \textwidth
      {\ifodd\recurselevel
         \hskip-2cm\externalfigure[pages][page=\recurselevel]\hss
       \else
         \hskip-1cm\externalfigure[pages][page=\recurselevel]\hss
       \fi}}

\stoptext

Wolfgang

___________________________________________________________________________________
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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2009-02-23 17:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-22 15:00 John Devereux
2009-02-23  9:54 ` Wolfgang Schuster
2009-02-23 17:04   ` John Devereux
2009-02-23 17:51     ` Wolfgang Schuster [this message]
2009-02-23 19:47       ` John Devereux

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=D1BB1991-78A5-495B-8FE0-271D990EE555@gmail.com \
    --to=schuster.wolfgang@googlemail.com \
    --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).