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 color for the borders of the current annotation.

Syntax

OLE_COLOR AnnotBorderColor { get; set; }
Value
Border color of the current annotation

Remarks

OLE_COLOR is a double word (4 bytes) value in the format 0x00BBGGRR. The low-order byte contains a value for the relative intensity of red; the second byte contains a value for green; and the third byte contains a value for blue. The high-order byte must be zero.

Example

Annotations Examples

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.AddEditBox(10, 10, 110, 50, 'edt1');
PDF.AnnotUnicodeText := 'Text';
PDF.EditBoxMaxLength := 40;
PDF.ControlBackColor := 255; { 0x000000ff - red }
PDF.ControlShowBorder := true;
PDF.AnnotBorderColor := 16711680; { 0x00ff0000 - blue }
PDF.AnnotBorderDashPattern := '[5 2]';
PDF.ControlUnicodeHint := 'Here is a hint.';
PDF.IsMultilineEditBox := true;
PDF.ControlTextAlign := taCenter;
PDF.ControlVerticalAlign := vaBottom;

PDF.AddComboBox(10, 60, 110, 76, 'comb1');
fnt := PDF.AddFont('Georgia', false, false, false, false, fcDefault);
PDF.ControlFont := fnt;
PDF.ControlFontSize := 14;
PDF.ComboBoxEditEnabled := false;
PDF.SetAnnotText('456', fcDefault);
PDF.ComboBoxUnicodeItems := '123' + #13#10 + '456' + #13#10+ '789';
PDF.ControlTextColor := 65280; { 0x0000ff00 - green }

PDF.AddCheckBox(0, 0, 1, 1, 'chck1');
PDF.AnnotUnicodeCaption := 'Here is a checkbox';
PDF.ControlChecked := true;
PDF.AnnotLeft := 140;
PDF.AnnotTop := 20;
PDF.AnnotWidth := 90;
PDF.AnnotHeight := 13;

PDF.SaveToFile('test.pdf', true);
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->AddEditBox(10, 10, 110, 50, "edt1");
PDF->AnnotUnicodeText = "Text";
PDF->EditBoxMaxLength = 40;
PDF->ControlBackColor = 255; // 0x000000ff - red
PDF->ControlShowBorder = true;
PDF->AnnotBorderColor = 16711680; // 0x00ff0000 - blue
PDF->AnnotBorderDashPattern = "[5 2]";
PDF->ControlUnicodeHint = "Here is a hint.";
PDF->IsMultilineEditBox = true;
PDF->ControlTextAlign = taCenter;
PDF->ControlVerticalAlign = vaBottom;

PDF->AddComboBox(10, 60, 110, 76, "comb1");
long fnt = PDF->AddFont("Georgia", false, false, false, false, fcDefault);
PDF->ControlFont = fnt;
PDF->ControlFontSize = 14;
PDF->ComboBoxEditEnabled = false;
PDF->SetAnnotText("456", fcDefault);
PDF->ComboBoxUnicodeItems = "123\r\n456\r\n789";
PDF->ControlTextColor = 65280; // 0x0000ff00 - green

PDF->AddCheckBox(0, 0, 1, 1, "chck1");
PDF->AnnotUnicodeCaption = "Here is a checkbox";
PDF->ControlChecked = true;
PDF->AnnotLeft = 140;
PDF->AnnotTop = 20;
PDF->AnnotWidth = 90;
PDF->AnnotHeight = 13;

PDF->SaveToFile("test.pdf", true);
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.AddEditBox(10, 10, 110, 50, "edt1");
PDF.AnnotUnicodeText = "Text";
PDF.EditBoxMaxLength = 40;
PDF.ControlBackColor = 255; // 0x000000ff - red
PDF.ControlShowBorder = true;
PDF.AnnotBorderColor = 16711680; // 0x00ff0000 - blue
PDF.AnnotBorderDashPattern = "[5 2]";
PDF.ControlUnicodeHint = "Here is a hint.";
PDF.IsMultilineEditBox = true;
PDF.ControlTextAlign = TextAlign.taCenter;
PDF.ControlVerticalAlign = VerticalAlign.vaBottom;

PDF.AddComboBox(10, 60, 110, 76, "comb1");
long fnt = PDF.AddFont("Georgia", false, false, false, false, FontCharset.fcDefault);
PDF.ControlFont = fnt;
PDF.ControlFontSize = 14;
PDF.ComboBoxEditEnabled = false;
PDF.SetAnnotText("456", FontCharset.fcDefault);
PDF.ComboBoxUnicodeItems = "123\r\n456\r\n789";
PDF.ControlTextColor = 65280; // 0x0000ff00 - green

PDF.AddCheckBox(0, 0, 1, 1, "chck1");
PDF.AnnotUnicodeCaption = "Here is a checkbox";
PDF.ControlChecked = true;
PDF.AnnotLeft = 140;
PDF.AnnotTop = 20;
PDF.AnnotWidth = 90;
PDF.AnnotHeight = 13;

PDF.SaveToFile("test.pdf", true);
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.AddEditBox 10, 10, 110, 50, "edt1"
PDF.AnnotUnicodeText = "Text"
PDF.EditBoxMaxLength = 40
PDF.ControlBackColor = 255 '0x000000ff - red
PDF.ControlShowBorder = true
PDF.AnnotBorderColor = 16711680 '0x00ff0000 - blue
PDF.AnnotBorderDashPattern = "[5 2]"
PDF.ControlUnicodeHint = "Here is a hint."
PDF.IsMultilineEditBox = true
PDF.ControlTextAlign = 1 'TextAlign.taCenter
PDF.ControlVerticalAlign = 2 'VerticalAlign.vaBottom

PDF.AddComboBox 10, 60, 110, 76, "comb1"
fnt = PDF.AddFont("Georgia", false, false, false, false, 1) 'FontCharset.fcDefault
PDF.ControlFont = fnt
PDF.ControlFontSize = 14
PDF.ComboBoxEditEnabled = false
PDF.SetAnnotText "456", 1 'FontCharset.fcDefault
PDF.ComboBoxUnicodeItems = "123" & vbCrLf & "456" & vbCrLf & "789"
PDF.ControlTextColor = 65280 '0x0000ff00 - green

PDF.AddCheckBox 0, 0, 1, 1, "chck1"
PDF.AnnotUnicodeCaption = "Here is a checkbox"
PDF.ControlChecked = true
PDF.AnnotLeft = 140
PDF.AnnotTop = 20
PDF.AnnotWidth = 90
PDF.AnnotHeight = 13

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