Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, December 11, 2012 7:06:27 AM(UTC)

fthomas  
fthomas

Groups: Registered
Posts: 12


Hi

Could you please provide the code for attaching a predifined text annotaion with out using the annotaion toolbar. I have a requirement to automatically fix a text annotaion on the first page of the the every document as it is being scanned.

Thanks in advance.

Regards
Francis Thomas
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Tuesday, December 11, 2012 7:53:05 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

Francis,

If you mean that you want to create a Text annotation object programmatically, the details depend on the programming interface (C DLL, .Net classes, etc.) that you use.
For example, if you are using LEADTOOLS .Net classes, you can create a Text annotation object by using the following code:
+---------------+
private void AnnTextObject_AnnTextObject(AnnContainer container, string textString)
{
AnnTextObject text = new AnnTextObject();
text.Pen = new AnnPen(Color.Red, new AnnLength(3));
text.Text = textString;
text.Brush = null;
text.Font = new AnnFont("Arial", new AnnLength(10, AnnUnit.Point), FontStyle.Regular);
text.EdgeMargin = AnnLength.Empty;
text.Alignment = StringAlignment.Center;
text.LineAlignment = StringAlignment.Center;
text.TextRotate = AnnTextRotate.Rotate0;
text.Bounds = new AnnRectangle(100, 100, 100, 100, AnnUnit.Pixel);
container.Objects.Add(text);
}
+---------------+
For more details, please refer to the LEADTOOLS .Net documentation.

If you mean something else, please provide me with more details about your requirements.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#3 Posted : Tuesday, December 11, 2012 11:49:01 AM(UTC)

fthomas  
fthomas

Groups: Registered
Posts: 12


Hi Maen,

Could you provide the code with the definition of the container in VB .Net? And how annotation is overlayed to the exisiting image in the viewer control.

Thanks
Francis Thomas
 
#4 Posted : Tuesday, December 11, 2012 8:58:50 PM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

Was thanked: 1 time(s) in 1 post(s)

I am attaching a VB.Net 2008 project that shows how you can create an AnnTextObject programmatically using LEADTOOLS v17.5 .Net classes.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
File Attachment(s):
VBNETAnnotation175.zip (15kb) downloaded 39 time(s).
 
#5 Posted : Wednesday, December 12, 2012 10:52:26 AM(UTC)

fthomas  
fthomas

Groups: Registered
Posts: 12


Hi Mean,

Thaks for attaching the project . The projrct do not open in VS 2008 or 2012. It gives error " project type is not supported (.vbproj).

Regards
Francis Thomas
 
#6 Posted : Wednesday, December 12, 2012 11:00:51 AM(UTC)

fthomas  
fthomas

Groups: Registered
Posts: 12


Thanks Maen. I have added the Form1 in a VS2010 project . It is working now.
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.104 seconds.