Dear Hans, On Thu, 25 Mar 2010, Michail Vidiassov wrote:
On Wed, 24 Mar 2010, Hans Hagen wrote:
there is u3d support presen tbut nobody tested it
thank you for your latest effort to put u3d support in a working state, but
now that Adobe has fallen in love with a new 3D format, PRC, the following is to be changed: 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". 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 <> >> } But what about an interface like \pdfmicroversion and automatic pushing up of PDF version once PRC annontation happens? 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 Sincerely, Michail 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). But while your method of answering my messages in lua works OK for new code (updating minimals and making a diff with old code is not harder than checking e-mail inbox - "Your morning patch, sir!" ;), I can not deduce from existing sea of ConTeXt code the status of file attachments support.