Components for Developers
© 2000-2008, Two Pilots

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF Add-on History In the Lab

PDF Creator Pilot documentation

Download CHM version of this manual.
Annotations
Collapse All

This property gets or sets the current annotation number.

Syntax

LONG CurrentAnnotation { get; set; }
Value
Number of the current annotation

Remarks

The annotation number can be retrieved from any annotation or control creating method, such as AddButton or AddTextAnnotation.

Example

Setting the Current Annotation (Control)

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
b1 := PDF.AddButton(10, 10, 110, 25, 'b1');
b2 := PDF.AddButton(130, 10, 230, 25, 'b2');

PDF.CurrentAnnotation := b1;
PDF.AnnotName := 'Button1';
PDF.AnnotUnicodeCaption := 'Button 1';

PDF.CurrentAnnotation := b2;
PDF.AnnotName := 'Button2';
PDF.AnnotUnicodeCaption := 'Button 2';

PDF.SaveToFile('test.pdf', true);
C/C++
[copy to clipboard]
// PDF object is supposed to be created
long b1 = PDF->AddButton(10, 10, 110, 25, "b1");
long b2 = PDF->AddButton(130, 10, 230, 25, "b2");

PDF->CurrentAnnotation = b1;
PDF->AnnotName = "Button1";
PDF->AnnotUnicodeCaption = L"Button 1";

PDF->CurrentAnnotation = b2;
PDF->AnnotName = "Button2";
PDF->AnnotUnicodeCaption = L"Button 2";

PDF->SaveToFile("test.pdf", true);
C#
[copy to clipboard]
// PDF object is supposed to be created
long b1 = PDF.AddButton(10, 10, 110, 25, "b1");
long b2 = PDF.AddButton(130, 10, 230, 25, "b2");

PDF.CurrentAnnotation = b1;
PDF.AnnotName = "Button1";
PDF.AnnotUnicodeCaption = "Button 1";

PDF.CurrentAnnotation = b2;
PDF.AnnotName = "Button2";
PDF.AnnotUnicodeCaption = "Button 2";

PDF.SaveToFile("test.pdf", true);
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
b1 = PDF.AddButton(10, 10, 110, 25, "b1")
b2 = PDF.AddButton(130, 10, 230, 25, "b2")

PDF.CurrentAnnotation = b1
PDF.AnnotName = "Button1"
PDF.AnnotUnicodeCaption = "Button 1"

PDF.CurrentAnnotation = b2
PDF.AnnotName = "Button2"
PDF.AnnotUnicodeCaption = "Button 2"

PDF.SaveToFile "test.pdf", true

See Also

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF Add-on History In the Lab

 

 

PDF Library | Virtual Printer | Converters to PDF

Support | Blog | Forum | Contacts

© 2000-2008, Two Pilots