ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Hans Hagen <j.hagen@xs4all.nl>
Subject: Re: Regular Online meeting
Date: Tue, 8 Feb 2022 00:19:04 +0100	[thread overview]
Message-ID: <65ce3886-19f5-3aae-d983-4c4abff65664@xs4all.nl> (raw)
In-Reply-To: <5b84506c-4e8e-961a-9b63-5ba2c47a1cdc@unitybox.de>

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
-----------------------------------------------------------------
___________________________________________________________________________________
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	other threads:[~2022-02-07 23:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-07 21:12 Gerhard Schramm via ntg-context
2022-02-07 23:19 ` Hans Hagen via ntg-context [this message]

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=65ce3886-19f5-3aae-d983-4c4abff65664@xs4all.nl \
    --to=ntg-context@ntg.nl \
    --cc=j.hagen@xs4all.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).