Page 1 of 1
Embed file in pure pdf
Posted: Thu Feb 01, 2018 9:35 am
by loulou2522
Hi all
I want to download a file embed in a pdf file with purebasic with clickin on a icon inside the document
Is it possible ?
Re: Embed file in pure pdf
Posted: Thu Feb 01, 2018 5:58 pm
by normeus
in the examples folder see "tutorial29"
Code: Select all
command: pdf_EmbedFile("filename","description of this file if you like")
this command if succesful returns a "FileId" which is an internal pointer to the file.
You don't have to do anything else for the file to be attached.
There is another PurePDF command which can use the "FileId", it is an annotation command.
this command creates a link inside a page to the file attached to the document:
from help file:
Code: Select all
pdf_SetAFile(Link.l, File.l, X.f, Page.l, Text$, Title$, w.f, h.f, DateTime.l, Icon$, Flags.l)
-> File
-> The FileId returned by pdf_EmbedFile()
Either way you can see the file in the document if you open attachments tab
Norm.