Debenu Quick PDF logo

AddLinkToEmbeddedFile

Document properties, Annotations and hotspot links

Version history

This function was introduced in Quick PDF Library version 7.11.

Description

Adds a clickable hotspot rectangle to the selected page which links to an embedded file.

Files can be embedded into the PDF using the AddEmbeddedFile function.

The function definition was changed in version 9.11 to provide separate parameters for the title/contents and transparency.

Syntax

Delphi

function TDebenuPDFLibrary1811.AddLinkToEmbeddedFile(Left, Top, Width, 
  Height: Double; EmbeddedFileID: Integer; Title, Contents: WideString; IconType, 
  Transpareny: Integer): Integer;

ActiveX

Function DebenuPDFLibrary1811.PDFLibrary::AddLinkToEmbeddedFile(Left As Double,
  Top As Double, Width As Double, Height As Double,
  EmbeddedFileID As Long, Title As String, Contents As String,
  IconType As Long, Transpareny As Long) As Long

DLL

int DPLAddLinkToEmbeddedFile(int InstanceID, double Left, double Top, double Width,
  double Height, int EmbeddedFileID, wchar_t * Title, wchar_t * Contents,
  int IconType, int Transpareny)

Parameters

Left The horizontal co-ordinate of the left edge of the hotspot rectangle
Top The vertical co-ordinate of the top of the hotspot rectangle
Width The width of the hotspot rectangle
Height The height of the hotspot rectangle
EmbeddedFileID The value returned from the AddEmbeddedFile function
Title The title of the attachment that should appear in the PDF viewer.
Contents The text to use for the contents of the popup
IconType 0 = Standard icon (PushPin)
1 = 28x28 disk image
2 = No icon
3 = Graph
4 = Paperclip
5 = Tag
6 = Solid white rectangle
Transpareny The transparency percentage to apply ranging from 0 to 100. A value of 0 indicates 0% transparency which is fully opaque (no transparency). A value of 100 indicates 100% transparency which would make the icon invisible.

Return values

0 The EmbeddedFileID parameter was invalid
1 The link was created successfully

Copyright © 2020 Debenu. All rights reserved. AboutContactBlogNewsletterSupport