From: Michail Vidiassov <master@iaas.msu.ru>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: 3D annotations
Date: Fri, 26 Mar 2010 08:53:50 +0300 (MSK) [thread overview]
Message-ID: <alpine.OSX.2.00.1003260815130.6418@macbook.local> (raw)
In-Reply-To: <alpine.OSX.2.00.1003252155070.6418@macbook.local>
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
<</ADBE
<</BaseVersion /1.7
/ExtensionLevel 3
>>
>>
}
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.
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2010-03-26 5:53 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 ` Michail Vidiassov [this message]
2010-03-26 15:32 ` 3D annotations Hans Hagen
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=alpine.OSX.2.00.1003260815130.6418@macbook.local \
--to=master@iaas.msu.ru \
--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).