From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/12607 Path: main.gmane.org!not-for-mail From: Jens-Uwe Morawski Newsgroups: gmane.comp.tex.context Subject: Re: new trickery / acrobat 6 Date: Thu, 10 Jul 2003 16:22:04 +0200 Sender: ntg-context-admin@ntg.nl Message-ID: <20030710162204.5bd287b0.morawski@gmx.net> References: <20030707183944.2f23dbb0.morawski@gmx.net> <5.2.0.9.1.20030709164359.0196ca28@localhost> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1057846994 12777 80.91.224.249 (10 Jul 2003 14:23:14 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 10 Jul 2003 14:23:14 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Thu Jul 10 16:23:10 2003 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19acJt-0003Gk-00 for ; Thu, 10 Jul 2003 16:22:49 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 1CECF10B35; Thu, 10 Jul 2003 16:23:33 +0200 (MEST) Original-Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by ref.ntg.nl (Postfix) with SMTP id 9A23810B1F for ; Thu, 10 Jul 2003 16:19:15 +0200 (MEST) Original-Received: (qmail 28006 invoked by uid 65534); 10 Jul 2003 14:19:14 -0000 Original-Received: from port1255.fra.ginko.net (EHLO melior.localdomain) (212.202.66.239) by mail.gmx.net (mp007) with SMTP; 10 Jul 2003 16:19:14 +0200 Original-To: ntg-context@ntg.nl In-Reply-To: <5.2.0.9.1.20030709164359.0196ca28@localhost> X-Mailer: Sylpheed version 0.8.11 (GTK+ 1.2.10; i586-pc-linux-gnu) Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:12607 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:12607 On Wed, 09 Jul 2003 16:47:39 -0400 Hans Hagen wrote: > 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