From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/57479 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: 3D annotations Date: Fri, 26 Mar 2010 16:32:19 +0100 Message-ID: <4BACD383.6050200@wxs.nl> References: <4BAA12FC.4070400@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1269617565 17610 80.91.229.12 (26 Mar 2010 15:32:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 26 Mar 2010 15:32:45 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Mar 26 16:32:41 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NvBWb-0001Re-Ic for gctc-ntg-context-518@m.gmane.org; Fri, 26 Mar 2010 16:32:41 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E552FC9C8F; Fri, 26 Mar 2010 16:32:40 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id QUdKEcvpPK6f; Fri, 26 Mar 2010 16:32:40 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id EA4B1C9C95; Fri, 26 Mar 2010 16:32:37 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4FBF3C9C95 for ; Fri, 26 Mar 2010 16:32:36 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id DHNrRzq81XXh for ; Fri, 26 Mar 2010 16:32:34 +0100 (CET) Original-Received: from mail.solcon.nl (unknown [217.121.8.199]) by balder.ntg.nl (Postfix) with ESMTP id 11160C9C8F for ; Fri, 26 Mar 2010 16:32:34 +0100 (CET) X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.100; Original-Received: from [10.100.1.100] (unverified [10.100.1.100]) by controller-9 (SurgeMail 4.2d2) with ESMTP id 6553-1713362 for multiple; Fri, 26 Mar 2010 16:31:27 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.8) Gecko/20100227 Lightning/1.0b1 Thunderbird/3.0.3 In-Reply-To: X-Authenticated-User: hagen@controller-9 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:57479 Archived-At: 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 > < < /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 ___________________________________________________________________________________