Hi
I have the below code that I need to use to create a Annotation on an existing PDF document.
It works, however the annotation has no text????? It is just a blank annotation.
Can anyone please help me???
-----------------------------------------------
pdfCreator1.Document.CurrentPage.CreateObject(IacObjectType.acObjectTypeStickyNote, "Hello");
IacAttribute attr = pdfCreator1.Document.CurrentPage.ObjectByName("Hello").AttributeByName("Note Top");
attr.Value = 1000;
IacAttribute attr1 = pdfCreator1.Document.CurrentPage.ObjectByName("Hello").AttributeByName("Note Left");
attr1.Value = 1000;
IacAttribute attr2 = pdfCreator1.Document.CurrentPage.ObjectByName("Hello").AttributeByName("Note Right");
attr2.Value = 5000;
IacAttribute attr3 = pdfCreator1.Document.CurrentPage.ObjectByName("Hello").AttributeByName("Note Bottom");
attr3.Value = 5000;
IacAttribute attr4 = pdfCreator1.Document.CurrentPage.ObjectByName("Hello").AttributeByName("text");
attr4.Value = "Hello my name is craig";
IacAttribute attr5 = pdfCreator1.Document.CurrentPage.ObjectByName("Hello").AttributeByName("Icon Top");
attr5.Value = 1000;
IacAttribute attr6 = pdfCreator1.Document.CurrentPage.ObjectByName("Hello").AttributeByName("Icon Left");
attr6.Value = 1000;
IacAttribute attr7 = pdfCreator1.Document.CurrentPage.ObjectByName("Hello").AttributeByName("Icon Right");
attr7.Value = 5000;
IacAttribute attr8 = pdfCreator1.Document.CurrentPage.ObjectByName("Hello").AttributeByName("Icon Bottom");
attr8.Value = 5000;
IacAttribute attr9 = pdfCreator1.Document.CurrentPage.ObjectByName("Hello").AttributeByName("Open");
attr9.Value = true;
SaveFileDialog dialog = new SaveFileDialog();
dialog.Filter = "pdf files (*.pdf)|*.pdf|All files (*.*)|*.*";
dialog.FilterIndex = 1;
dialog.RestoreDirectory = true;
if (dialog.ShowDialog() == DialogResult.OK)
{
pdfCreator1.Document.Save(dialog.OpenFile(), IacFileSaveOption.acFileSaveDefault);
}