[NTG-context] Regular Online meeting

Hans Hagen j.hagen at xs4all.nl
Tue Feb 8 00:19:04 CET 2022


On 2/7/2022 10:12 PM, Gerhard Schramm via ntg-context wrote:
> Dear Hraban, Dear Hans
> 
> I'm looking for a way to automatically rotate a graphic 
> (DIN_A4_PDF_Pages). I try to manage technical manuals with Context. 
> (Which is really great!) To do this, I have to import always new 
> PDF-pages (technical sketches) , which can be in landscape or portrait 
> format. The pages should always be displayed as large as possible on the 
> pages of my manuals. (I have no influence on the PDF's, as they come 
> from other departments.) Do you see a possibility here? kind regards Gerd
>
\starttext

     \showframe

     \starttexdefinition MaxFigure #1#2
         \page
             \getfiguredimensions[#1][page=#2]\relax
             \ifdim\figurewidth>\figureheight\relax
                 \externalfigure
                    [#1]
                    [page=#2,
                     frame=on,
                     orientation=90,
                     width=\textheight]
             \else
                 \externalfigure
                   [#1]
                   [page=#2,
                    frame=on,
                    height=\textheight]
             \fi
         \page
     \stoptexdefinition

     \MaxFigure{math.pdf}{1}
     \MaxFigure{math.pdf}{2}

\stoptext




-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the ntg-context mailing list