ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Pdf info with Lua/Ctx API
Date: Wed, 16 Aug 2017 13:57:50 +0200	[thread overview]
Message-ID: <5994333E.8030507@gmail.com> (raw)
In-Reply-To: <op.y416k0x93h68c7@lprx>


[-- Attachment #1.1: Type: text/plain, Size: 1500 bytes --]


> Procházka Lukáš Ing. <mailto:LPr@pontex.cz>
> 16. August 2017 um 12:11
> Hello Hans,
>
> thank you for implementation 'figures.getinfo()'; two points:
>
> 1. Code:
>
> ----
> \startluacode
>
> local n = 
> "x:/Users/MMi/Akce/I-6_Krusovice.DSP-ZDS/Admin/Jednani/2017-07-07-SU-Rakovnik/ZJ.pdf" 
>
> local d = figures.getinfo(n)
> ...
> ----
>
> prints (probably to-string converted) resulting table:
>
> "
> close source > level 3, order 8, name 
> 'd://Lukas/ConTeXt/Styles/PxLetter.sty'
> table={
>  ["request"]={
>   ["arguments"]=false,
>   ["cache"]=false,
>   ["color"]=false,
>   ["controls"]=false,
>   ["conversion"]=false,
>   ["display"]=false,
>   ["format"]=false,
>   ["height"]=false,
>   ["label"]=false,
>   ["mask"]=false,
>   
> ["name"]="x:/Users/MMi/Akce/I-6_Krusovice.DSP-ZDS/Admin/Jednani/2017-07-07-SU-Rakovnik/ZJ.pdf", 
>
> ...
>  },
>  ["status"]={
> ...
>  },
>  ["used"]={
>   ["colordepth"]=0,
>   ["depth"]=0,
>   ["format"]="pdf",
>   
> ["fullname"]="x:/Users/MMi/Akce/I-6_Krusovice.DSP-ZDS/Admin/Jednani/2017-07-07-SU-Rakovnik/ZJ.pdf", 
>
>   ["height"]=55380991,
> ...
>  },
> }
> "
>
> - Is it intend? Or residual debugging status?
>
>
> 2. Is there a Ctx built-in converter which would convert width and 
> height (e.g. here: ["height"]=55380991) from "height units" to 
> milimeters?
\starttext

\startluacode

local length = "55380991"

context(number.topoints(length))

context.par()

context(number.todimen(length,"pt"))

\stopluacode

\stoptext

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 2629 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
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:[~2017-08-16 11:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-14 11:08 Procházka Lukáš Ing.
2017-08-14 14:55 ` Hans Hagen
2017-08-15 12:08   ` Procházka Lukáš Ing.
2017-08-16 10:11   ` Procházka Lukáš Ing.
2017-08-16 11:57     ` Wolfgang Schuster [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=5994333E.8030507@gmail.com \
    --to=schuster.wolfgang@gmail.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).