On 1/4/2017 9:31 PM, Cesar Romani wrote:
I'm using the following code, rotate.tex, to rotate all the pages of
file.pdf, using: context --input=file.pdf --rotation=45 rotate.pdf

rotate.tex
==========
\getfiguredimensions [\getdocumentargument{input}]
\starttext
  \dorecurse{\noffigurepages}
    {\startTEXpage
      \externalfigure
        [\getdocumentargument{input}]
        [page=\recurselevel,
         orientation=\getdocumentargument{rotation}]
    \stopTEXpage}
\stoptext

How could I use this code to rotate, say, the page five, 7º clockwise,
and the page twenty, 15º counterclockwise?

\starttext

  \dorecurse{\noffigurepages}
    {\startTEXpage
      \doifelsesomething{\getdocumentargument{r\recurselevel}} {%
          \externalfigure
            [\getdocumentargument{input}]
            [page=\recurselevel,
             orientation=\getdocumentargument{r\recurselevel}]
        } {%
          \externalfigure
            [\getdocumentargument{input}]
            [page=\recurselevel,
             orientation=\getdocumentargument{rotation}]
        }%
    \stopTEXpage}

\stoptext


--r5=7 --r20=15 --rotation=45

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to