Attach (embed) a file info a .pdf
Hello, I'm not able to recall the way how to attach a file into a .pdf being generated. I need the attached files to be "openable" or "savable" from the .pdf - see the image. How to achieve this with ConTeXt? Best regards, Lukas -- Ing. Lukáš Procházka [mailto:LPr@pontex.cz] Pontex s. r. o. [mailto:pontex@pontex.cz] [http://www.pontex.cz] Bezová 1658 147 14 Praha 4 Tel: +420 241 096 751 Fax: +420 244 461 038
Am 23.04.2014 um 09:33 schrieb Procházka Lukáš Ing. - Pontex s. r. o.
Hello,
I'm not able to recall the way how to attach a file into a .pdf being generated.
I need the attached files to be "openable" or "savable" from the .pdf - see the image.
How to achieve this with ConTeXt?
Comments from scrn-wid.mkvi: % old but stil valid method: % % \useattachment[test.tex] % \useattachment[whatever][test.tex] % \useattachment[whatever][newname][test.tex] % \useattachment[whatever][title][newname][test.tex] % % new method: % % \registerattachment[sometag][specification] % name file author title subtitle % % \attachment[sometag][extra specs] % \attachment[test.tex] % \attachment[file=test.tex] % \attachment[file=test.tex,method=hidden] % \attachment[name=newname,file=test.tex] % \attachment[title=mytitle,name=newname,file=test.tex] % % indirect % % \defineattachment[whatever5][file=test.tex] \attachment[whatever5][method=hidden] % \defineattachment[whatever5][file=test.tex,method=hidden] \attachment[whatever5] % % direct (no definitions) % % \attachment[test][file=oeps.tex,title=Oeps,author=Hans,subtitle=TeX File,method=hidden] % \attachment[label=test,file=oeps.tex,title=Oeps,author=Hans,subtitle=TeX File,method=hidden] % % autolabel: % % \attachment[file=oeps.tex,title=Oeps,author=Hans,subtitle=TeX File,method=hidden] Wolfgang
... Great, thank you! Lukas
Comments from scrn-wid.mkvi:
% old but stil valid method: % % \useattachment[test.tex] % \useattachment[whatever][test.tex] % \useattachment[whatever][newname][test.tex] % \useattachment[whatever][title][newname][test.tex] % % new method: % % \registerattachment[sometag][specification] % name file author title subtitle % % \attachment[sometag][extra specs] % \attachment[test.tex] % \attachment[file=test.tex] % \attachment[file=test.tex,method=hidden] % \attachment[name=newname,file=test.tex] % \attachment[title=mytitle,name=newname,file=test.tex] % % indirect % % \defineattachment[whatever5][file=test.tex] \attachment[whatever5][method=hidden] % \defineattachment[whatever5][file=test.tex,method=hidden] \attachment[whatever5] % % direct (no definitions) % % \attachment[test][file=oeps.tex,title=Oeps,author=Hans,subtitle=TeX File,method=hidden] % \attachment[label=test,file=oeps.tex,title=Oeps,author=Hans,subtitle=TeX File,method=hidden] % % autolabel: % % \attachment[file=oeps.tex,title=Oeps,author=Hans,subtitle=TeX File,method=hidden]
Wolfgang
-- Ing. Lukáš Procházka [mailto:LPr@pontex.cz] Pontex s. r. o. [mailto:pontex@pontex.cz] [http://www.pontex.cz] Bezová 1658 147 14 Praha 4 Tel: +420 241 096 751 Fax: +420 244 461 038
... One more question: the following example seems not to contain any attachment: ---- t4.mkiv \attachment[t4.mkiv] \starttext AAA \stoptext ---- What's wrong? Lukas
Comments from scrn-wid.mkvi:
% old but stil valid method: % % \useattachment[test.tex] % \useattachment[whatever][test.tex] % \useattachment[whatever][newname][test.tex] % \useattachment[whatever][title][newname][test.tex] % % new method: % % \registerattachment[sometag][specification] % name file author title subtitle % % \attachment[sometag][extra specs] % \attachment[test.tex] % \attachment[file=test.tex] % \attachment[file=test.tex,method=hidden] % \attachment[name=newname,file=test.tex] % \attachment[title=mytitle,name=newname,file=test.tex] % % indirect % % \defineattachment[whatever5][file=test.tex] \attachment[whatever5][method=hidden] % \defineattachment[whatever5][file=test.tex,method=hidden] \attachment[whatever5] % % direct (no definitions) % % \attachment[test][file=oeps.tex,title=Oeps,author=Hans,subtitle=TeX File,method=hidden] % \attachment[label=test,file=oeps.tex,title=Oeps,author=Hans,subtitle=TeX File,method=hidden] % % autolabel: % % \attachment[file=oeps.tex,title=Oeps,author=Hans,subtitle=TeX File,method=hidden]
Wolfgang
-- Ing. Lukáš Procházka [mailto:LPr@pontex.cz] Pontex s. r. o. [mailto:pontex@pontex.cz] [http://www.pontex.cz] Bezová 1658 147 14 Praha 4 Tel: +420 241 096 751 Fax: +420 244 461 038
Am 23.04.2014 um 11:32 schrieb Procházka Lukáš Ing. - Pontex s. r. o.
... One more question: the following example seems not to contain any attachment:
---- t4.mkiv \attachment[t4.mkiv]
\starttext AAA \stoptext ----
What's wrong?
Add \setupinteraction[state=start] to your document. Wolfgang
On Wed, 23 Apr 2014 11:37:02 +0200, Wolfgang Schuster
\setupinteraction[state=start]
It work now, thanks. And - hopefully the last question: Is it possible to affect the icon shown (now: "pin") (to be eg. "paperclip")? And is it possible to hide the icon completely? (I tried "method=hidden" but this produces "attachment.txt" instead of "t4.mkiv" as an attachment). Best regards, Lukas -- Ing. Lukáš Procházka [mailto:LPr@pontex.cz] Pontex s. r. o. [mailto:pontex@pontex.cz] [http://www.pontex.cz] Bezová 1658 147 14 Praha 4 Tel: +420 241 096 751 Fax: +420 244 461 038
Am 23.04.2014 um 11:51 schrieb Procházka Lukáš Ing. - Pontex s. r. o.
On Wed, 23 Apr 2014 11:37:02 +0200, Wolfgang Schuster
wrote: \setupinteraction[state=start]
It work now, thanks.
And - hopefully the last question:
Is it possible to affect the icon shown (now: "pin") (to be eg. "paperclip“)?
You can change the symbol with \setupattachments[symbol=Paperclip] but this doesn’t produce the right symbol because there is a spelling error in the source (should be fixed in the next beta).
And is it possible to hide the icon completely? (I tried "method=hidden" but this produces "attachment.txt" instead of "t4.mkiv" as an attachment).
I think it’s a bug because there appears only a empty attachment in the document. Wolfgang
On 4/23/2014 12:20 PM, Wolfgang Schuster wrote:
Am 23.04.2014 um 11:51 schrieb Procházka Lukáš Ing. - Pontex s. r. o.
: On Wed, 23 Apr 2014 11:37:02 +0200, Wolfgang Schuster
wrote: \setupinteraction[state=start]
It work now, thanks.
And - hopefully the last question:
Is it possible to affect the icon shown (now: "pin") (to be eg. "paperclip“)?
You can change the symbol with
\setupattachments[symbol=Paperclip]
but this doesn’t produce the right symbol because there is a spelling error in the source (should be fixed in the next beta).
And is it possible to hide the icon completely? (I tried "method=hidden" but this produces "attachment.txt" instead of "t4.mkiv" as an attachment).
I think it’s a bug because there appears only a empty attachment in the document.
i patched the keys cf. your mail but is there more to fix? ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
Procházka Lukáš Ing. - Pontex s. r. o.
-
Wolfgang Schuster