Re: [NTG-context] new trickery / acrobat 6

2003-07-12 Thread Hans Hagen
At 16:22 10/07/2003 +0200, you wrote:

\setupinteraction[state=start]

\useattachment[whatever][test1.txt]

\definesymbol
   [ObjectNumber]
   [object number \PDFattachmentnumber]
\setupattachments[symbol={ObjectNumber}]

\starttext \attachment[whatever] \stoptext
---
gives object number 7 written in the PDF file, but the
object that contains the _real_ data stream is object 6, not 7:
6 0 obj 
/Length 20

stream
Das ist Testdatei 1
endstream
endobj
7 0 obj
 /Type /Filespec /F (test1.txt) /EF /F 6 0 R 
endobj
thus, in order to get the correct obj number for pdftosrc one
need the number of the stream-object.
hm, pdftosrc should probably accept both as valid numbers (i.e. in case of 
no 7 resolve it to 6), so if there's someone out there willing to patch ...

another thing that might be useful is that \PDFattachmentnumber
should read the attachment name as argument and return the obj-number.
the above symbol could then be defined as:
\definesymbol
   [ObjectNumber]
   [object number \PDFattachmentnumber[\currentattachment]]
_and_ one can use it inside the text:

\starttext
This PDF-document has the file test1.txt attached. Users of pdftosrc
can extract the PDF-object \PDFattachmentnumber[whatever] to
get the file.
\stoptext
this is kind of tricky, since we're never sure if forward or backward 
referencing takes place (apart form the fact that this kind of trickery can 
seldom b eimplemented in a clean way). Anyhow, since i happen to be doing 
things with attachments currently you're lucky; i made you:

\starttext

\definesymbol
  [ObjectNumber]
% [object number {\PDFattachmentnumber[xx]}]
  [object number \PDFattachmentnumber]
\useattachment[test][xx][test.tex]
\setupattachments[symbol=ObjectNumber]
\attachment[test]
\stoptext

(in case of just two args, i.e. no [xx], you need to feed the filename, 
i.e. test.txt)

I'll send you the patched spec file (keep in mind that this 
\PDFattachmentnumber is some driver functionality, and not something of teh 
core).

Hans
-
  Hans Hagen | PRAGMA ADE | [EMAIL PROTECTED]
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-
   information: http://www.pragma-ade.com/roadmap.pdf
documentation: http://www.pragma-ade.com/showcase.pdf
-
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] new trickery / acrobat 6

2003-07-09 Thread Hans Hagen
At 00:16 09/07/2003 +0200, you wrote:
On Mon, 7 Jul 2003 22:52:39 +0200
Henning Hraban Ramm [EMAIL PROTECTED] wrote:

 Am Montag, 07.07.03, um 18:39 Uhr (Europe/Zurich) schrieb Jens-Uwe
 Morawski:
  Nice feature to distribute a file together with its documentation, but
  how
  can i extract the attached file. AR (Linux version) seems not to have a
  function for this. Is there an utillity program?

 In Acrobat (not Reader) it's in File:Properties:Embedded Objects.
 (That is, in german it reads: Datei:Dokumenteigenschaften:Eingebettete
 Datenobjekte)
 I can't find it in Reader (5.05 on MacOS X).
Linux AR has this menu entry but it doesn't work.
However, i found pdftosrc by Han The Thanh that seems to be part
of the pdftex distribution. The problem is that one has to know the
number of the pdf-object that contains the data stream.
maybe \setupattachments[symbol=objectnumber] could be implemented?!
I added \PDFattachmentnumber

\definesymbol
  [ObjectNumber]
  [object number \PDFattachmentnumber]
i'll send you a new spec-fdf with its definition in it

Hans
-
  Hans Hagen | PRAGMA ADE | [EMAIL PROTECTED]
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-
   information: http://www.pragma-ade.com/roadmap.pdf
documentation: http://www.pragma-ade.com/showcase.pdf
-
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] new trickery / acrobat 6

2003-07-07 Thread Henning Hraban Ramm
Am Montag, 07.07.03, um 18:39 Uhr (Europe/Zurich) schrieb Jens-Uwe 
Morawski:
Nice feature to distribute a file together with its documentation, but 
how
can i extract the attached file. AR (Linux version) seems not to have a
function for this. Is there an utillity program?
In Acrobat (not Reader) it's in File:Properties:Embedded Objects.
(That is, in german it reads: Datei:Dokumenteigenschaften:Eingebettete 
Datenobjekte)
I can't find it in Reader (5.05 on MacOS X).

hmm, i've no AR6 to test this and even i don't know what pdf-layering 
means,
but for me it sound like that we have now two layering methods in 
ConteXt:
pdf-layering and layers defined by \definelayer... Wouldn't it be 
better to bring
them together in one user interface and make the pdf-based layering an 
option:
PDF layers (officially optional content groups) have not much
to do with ConTeXt layers.
In PDF 1.5 (Acrobat 6) there's a new feature that allows hiding of
some objects, like the layers palette in DTP or CAD software.
But PDF layers are more: they can be connected with special view
sizes (increase detail level while zooming in) and much more.
Think of
- different language versions in the same document
- b/w and color versions in the same document
- additional content that is only visible with a password
- architectural drawings: floors or pipes, wires, walls, furniture ...
  (one layer for each craftsman)
- other CAD stuff
- higher detail level with zoom (I saw this with a city map)
- and much more...
PDF guru Stephan Jaeggi said, the possibilities of this new
technique were overwhelming as a Adobe developer showed him
some details.
Think further of layers combined with transparency options --
creative possibilities like in Photoshop! (Don't know if this
really works, but I guess.)
Besides AutoCAD there's no commercial software that can write
such layers -- ConTeXt seems to be ahead the whole industry!
Really big deal, Hans!
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context