ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: 3D annotations
Date: Fri, 26 Mar 2010 16:32:19 +0100	[thread overview]
Message-ID: <4BACD383.6050200@wxs.nl> (raw)
In-Reply-To: <alpine.OSX.2.00.1003260815130.6418@macbook.local>

On 26-3-2010 6:53, Michail Vidiassov wrote:

> lpdf-u3d.lua
>
> if not stream then
> local attr = pdfdictionary {
> Type = pdfconstant("3D"),
> - Subtype = pdfconstant("U3D"),
> }
> + if string.upper(string.sub(foundname,-4))==".PRC" then
> + attr.Subtype = pdfconstant("PRC")
> + else
> + attr.Subtype = pdfconstant("U3D")
> + end
> local streamviews = checkedkey(streamparam, "views", "table")
> if streamviews then
> local list = pdfarray()
>
> May be a more robust way is to read first 3 bytes of the model file, since
> "U3D" or "PRC" signature is always there - that can be done instead of
> relying on file name extension or only in case it it not "u3d" or "prc".

more like:

         local subtype, subdata = "U3D", io.readdata(foundname) or ""
         if find(subdata,"^PRC") then
             subtype == "PRC"
         elseif find(subdata,"^U3D") then
             subtype == "U3D"
         elseif file.extname(foundname) == "prc" then
             subtype == "PRC"
         end

> Also PRC annotations have to trigger setting PDF version to 1.7.3
> (developer extensions dictionary mechanism).
> It can be done per your advice directly
>
> \doPDFaddtocatalog {
> /Extensions
> <</ADBE
> <</BaseVersion /1.7
> /ExtensionLevel 3
>  >>
>  >>
> }
>
> But what about an interface like \pdfmicroversion and
> automatic pushing up of PDF version once PRC annontation happens?

i don't know that command and anyway want to get rid of all commands 
that start with \pdf

concerning versions ... peter rolf and i are working on detailed support 
for standards (also related to preflighting) and before i even want to 
look in some automated version handling we first need to get that bit 
done well

> Also I try to remind you about pdfboolean problem in lpdf-ini.lua
> (old code is not OK if b is "false" and default is "true")
>
> local function pdfboolean(b,default)
> - if ((type(b) == "boolean") and b) or default then
> - return p_true
> + if type(b) ~= "boolean" then
> + if default then
> + return p_true
> + else
> + return p_false
> + end
> else
> - return p_false
> + if b then
> + return p_true
> + else
> + return p_false
> + end
> end
> end

i need to check it ... later (also for interferences)


> PS. And a great palliative way to deal with 3D annotations is via
> attaching a 3D PDF file made with LaTeX (by Asymptote, for example).

well, one can attach files as-is already (unless it's broken)

> I can not deduce from existing sea of ConTeXt code the status of file
> attachments support.

\attachment has been there for ages

actually, all kind of annotations hav ebeen supported as soon as they 
showed up in acrobat (mediademo is an exmaple of flash) but i gave up on 
implementing these things too early as in acrobat/pdf such new tricks 
normally needs a few versions to reach stability

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2010-03-26 15:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-24  9:23 status of node.write Michail Vidiassov
2010-03-24  9:52 ` luigi scarso
2010-03-24 10:53   ` Michail Vidiassov
2010-03-24 11:10     ` luigi scarso
2010-03-24 13:02       ` Michail Vidiassov
2010-03-24 14:20         ` luigi scarso
2010-03-24 14:29           ` Hans Hagen
2010-03-24 16:46             ` Michail Vidiassov
2010-03-25 15:37               ` Hans Hagen
2010-03-25 14:18             ` PDF annotations problems - was: " Michail Vidiassov
2010-03-24 13:26   ` Hans Hagen
2010-03-25 19:12     ` 3D annotations - was: " Michail Vidiassov
2010-03-25 22:24       ` Hans Hagen
2010-03-26  5:53       ` 3D annotations Michail Vidiassov
2010-03-26 15:32         ` Hans Hagen [this message]
2010-03-24 10:17 ` status of node.write Hans Hagen
2010-04-17  7:00 3D annotations Michail Vidiassov
2010-05-02  9:08 gummybears
2010-05-04 10:06 gummybears
2010-05-04 14:15 ` Michail Vidiassov

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=4BACD383.6050200@wxs.nl \
    --to=pragma@wxs.nl \
    --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).