Re: [NTG-context] Using texexec to prepare single-sided PDF for double-sided printing

2009-02-23 Thread Wolfgang Schuster


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

you can add this to the wiki.

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
___


Re: [NTG-context] Using texexec to prepare single-sided PDF for double-sided printing

2009-02-23 Thread John Devereux
Wolfgang Schuster schuster.wolfg...@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.

 you can add this to the wiki.

Will do.

-- 

John Devereux
___
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
___


Re: [NTG-context] Using texexec to prepare single-sided PDF for double-sided printing

2009-02-23 Thread Wolfgang Schuster


Am 23.02.2009 um 18:04 schrieb John Devereux:


Wolfgang Schuster schuster.wolfg...@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
___


Re: [NTG-context] Using texexec to prepare single-sided PDF for double-sided printing

2009-02-23 Thread John Devereux
Wolfgang Schuster schuster.wolfg...@googlemail.com writes:

 Am 23.02.2009 um 18:04 schrieb John Devereux:

 Wolfgang Schuster schuster.wolfg...@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

Thanks Wolfgang, I got that to work perfectly. I had to fiddle around with
it, I put the result on the Wiki

http://wiki.contextgarden.net/Including_pages_from_PDF_document


(Please move/amend as appropriate)


% replace Manual with the name of your original pdf
\define\MySingleSidedDocument{Manual}

% can adjust topspace to move page etc
\setuplayout[\MySingleSidedDocument,topspace=1cm,header=0cm,backspace=0cm]
% suppress page numbering
\setuppagenumbering[location=]

\starttext

\getfiguredimensions[\MySingleSidedDocument]

\dorecurse\noffigurepages
  {\hbox to \textwidth
 {\ifodd\recurselevel
%adjust number to set odd page horizontal position

\hskip-0.1cm\externalfigure[\MySingleSidedDocument][page=\recurselevel]\hss
  \else
%adjust number to set even page horizontal position

\hskip-1.8cm\externalfigure[\MySingleSidedDocument][page=\recurselevel]\hss
  \fi}}
\stoptext



-- 

John Devereux
___
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
___


[NTG-context] Using texexec to prepare single-sided PDF for double-sided printing

2009-02-22 Thread John Devereux

Hi,

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.

I don't want to put 2 pages on one output sheet - although the ability
to fine-tune the scaling might be useful.

I have experimented with plenty of combinations of 

texexec --pdfarrange 

...but I am not getting anywhere.

Any suggestions appreciated. I am on debian and there are plenty of
other pdf tools, but none of these seem quite right either. It would
seem a common enough requirement but nothing quite works!

Thanks,

-- 

John Devereux
___
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
___