Hi, Here are some new thingies for pdf freaks: \setupinteraction[state=start] \useattachment[whatever][test.tex] % \setupattachments[\c!symbool={symbol-normal,symbol-down}] \starttext \attachment[whatever] \stoptext This will embed a file and works ok in acrobat <=6. If you have acrobat 6, there is now some rudimentary support for pdf-layering. http://www.pragma-ade.com/temp/pre-dtp.pdf http://www.pragma-ade.com/temp/layers.pdf In acrobat 6, there is a layers tab on the left end of the screen. The pre-dtp file only has layers enabled on the page that talks about layers (fyi, this is the presentation i used for eurotex). Not to be redistributed! ... and of course a new beta, take your most complex document, process it with \showlayoutcomponents, and you'll get access to all text/graphic layers that are in there. Nice for debugging. Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl 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 -------------------------------------------------------------------------
Hi Hans,
http://www.pragma-ade.com/temp/pre-dtp.pdf http://www.pragma-ade.com/temp/layers.pdf
Ik heb weliswaar acrobat 6 niet, toch jou presentatie ziet er prachtig uit! Willi
On Thu, 03 Jul 2003 13:55:57 +0200
Hans Hagen
Here are some new thingies for pdf freaks:
\setupinteraction[state=start]
\useattachment[whatever][test.tex]
% \setupattachments[\c!symbool={symbol-normal,symbol-down}]
\starttext \attachment[whatever] \stoptext
This will embed a file and works ok in acrobat <=6.
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? However, there is a problem if i uncomment the \setupattachments: ConTeXt ver: 2003.7.3 fmt: 2003.7.4 int: english mes: english ! Missing \endcsname inserted. <to be read again> \unhbox \leavevmode ->\unhbox \voidb@x \bottomaccent #1#2#3#4#5->\leavevmode \vtop {\forgetall \baselineskip \zerop... \dohandleaccent ...acterencoding #1\endcsname {#2} \else \csname \accentprefi... <argument> \c ! symbool \dosetvalue ...!internal!n \ifcsname \k!prefix! #2 \endcsname \let \c!interna... ... l.8 \setupattachments[\c!symbool={symbol-down}]
If you have acrobat 6, there is now some rudimentary support for pdf-layering.
http://www.pragma-ade.com/temp/pre-dtp.pdf http://www.pragma-ade.com/temp/layers.pdf
In acrobat 6, there is a layers tab on the left end of the screen.
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: \definelayer[L1] \setuplayer[L1][mode=pdf] or are these both layering methods too different? Regards, Jens
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!
On Mon, 7 Jul 2003 22:52:39 +0200
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).
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?! Best, Jens
At 00:16 09/07/2003 +0200, you wrote:
On Mon, 7 Jul 2003 22:52:39 +0200 Henning Hraban Ramm
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 | pragma@wxs.nl 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 -------------------------------------------------------------------------
On Wed, 09 Jul 2003 16:47:39 -0400
Hans Hagen
At 00:16 09/07/2003 +0200, you wrote:
maybe \setupattachments[symbol=objectnumber] could be implemented?!
I added \PDFattachmentnumber
\definesymbol [ObjectNumber] [object number \PDFattachmentnumber]
this works not exactly how i would expect it: --- \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 <> >> endobj
thus, in order to get the correct obj number for pdftosrc one need the number of the stream-object. 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 Regards, Jens
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 <> >> 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 | pragma@wxs.nl 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 -------------------------------------------------------------------------
participants (4)
-
Hans Hagen
-
Henning Hraban Ramm
-
Jens-Uwe Morawski
-
Willi Egger