VintaSoft PDF .NET Plug-in Discussions
Questions, comments and suggestions concerning VintaSoft PDF .NET Plug-in.
Board index < VintaSoft Imaging < VintaSoft PDF .NET Plug-in Discussions
Is there a way to set a text annotation to edit mode programmatically?Yes, this is possible.
// ...
// subscribe to the AnnotationTool.BuildingFinished event
_annotationTool.BuildingFinished += AnnotationTool_BuildingFinished;
// ...
/// <summary>
/// The annotation building is finished.
/// </summary>
private void AnnotationTool_BuildingFinished(object sender, PdfAnnotationViewEventArgs e)
{
// get annotation view for newly created annotation
PdfFreeTextAnnotationView textView = e.AnnotationView as PdfFreeTextAnnotationView;
// if newly created annotation is PDF free text annotation
if (textView != null)
{
// find text box transformer
TextObjectTextBoxTransformer textBoxTransformer = CompositeInteractionController.FindInteractionController<TextObjectTextBoxTransformer>(textView.Transformer);
// if text box transformer is found
if (textBoxTransformer != null)
{
// get annotation tool
PdfAnnotationTool annotationTool = (PdfAnnotationTool)sender;
// show text box
textBoxTransformer.ShowTextBox(annotationTool.ImageViewer, textView.GetBoundingBox().Location);
}
}
}
Best regards, Alexander