Embed file in pure pdf

Just starting out? Need help? Post your questions and find answers here.
loulou2522
Enthusiast
Enthusiast
Posts: 542
Joined: Tue Oct 14, 2014 12:09 pm

Embed file in pure pdf

Post 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 ?
normeus
Enthusiast
Enthusiast
Posts: 470
Joined: Fri Apr 20, 2012 8:09 pm
Contact:

Re: Embed file in pure pdf

Post 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.
google Translate;Makes my jokes fall flat- Fait mes blagues tombent à plat- Machte meine Witze verpuffen- Eh cumpari ci vo sunari
Post Reply