Is there a way to set the color with the Highlighter?
Amyuni.PDFCreator.IacCommandTool.acCommandToolHighlight
Highlighter background color
Hello,
In order to select or modify the default highlight color you will need to handle the FireNewObject() event and change the Highlight color then. When the event is fired you verify if object is a Highlight and if it, then you can change the BackColor property of the object.
I have included a C# code snippet which illustrate this.
private int pdfCreator1_FireNewObject(object sender, Amyuni.PDFCreator.IacEventArgs e) {
//Get the object type of the newly created object.
Amyuni.PDFCreator.IacAttribute attr =
e.acObject.Attribute("ObjectType");
if ( attr != null )
{
//Check if new object is a HighLight
if ( (int) attr.Value == (int)
Amyuni.PDFCreator.IacObjectType.acObjectTypeHighlight )
{
e.acObject.AttributeByName("BackColor").Value = 0x00FFFF; //Yellow
}
}
return 1;
}
In order to select or modify the default highlight color you will need to handle the FireNewObject() event and change the Highlight color then. When the event is fired you verify if object is a Highlight and if it, then you can change the BackColor property of the object.
I have included a C# code snippet which illustrate this.
private int pdfCreator1_FireNewObject(object sender, Amyuni.PDFCreator.IacEventArgs e) {
//Get the object type of the newly created object.
Amyuni.PDFCreator.IacAttribute attr =
e.acObject.Attribute("ObjectType");
if ( attr != null )
{
//Check if new object is a HighLight
if ( (int) attr.Value == (int)
Amyuni.PDFCreator.IacObjectType.acObjectTypeHighlight )
{
e.acObject.AttributeByName("BackColor").Value = 0x00FFFF; //Yellow
}
}
return 1;
}