←Select platform

AnnBatesStamp Class

Defines a Bates stamp that is composed from a list of Bates stamp elements with different types.
public class AnnBatesStamp : IDisposable 
public class AnnBatesStamp 
   ref class AnnBatesStamp : IDisposable 
class AnnBatesStamp(IDisposable): 

Allows control of Bates stamps using many properties to adjust their position and appearance.

Bates stamps are used on multi-single annotation containers and added at a specific location on the container. Headers and footers can also be defined.

The stamp can be repeated on multi containers with the elements added to the Bates stamp object. The following elements can be passed to the Bates stamp object Elements:

using Leadtools.Annotations.Engine; 
using Leadtools.Annotations.Automation; 
using Leadtools.Annotations.Rendering; 
using Leadtools.Annotations.WinForms; 
using Leadtools.Annotations.BatesStamp; 
public void AnnBatesStampComposer_AnnBatesStampComposer() 
	//Create AnnBatesStamp and set its properties  
	AnnBatesStamp batesStamp = new AnnBatesStamp(); 
	batesStamp.Font = new AnnFont("Arial", 12); 
	batesStamp.Foreground = AnnSolidColorBrush.Create("Red"); 
	batesStamp.HorizontalAlignment = AnnHorizontalAlignment.Center; 
	batesStamp.VerticalAlignment = AnnVerticalAlignment.Center; 
	batesStamp.Logo.Angle = 45; 
	batesStamp.Logo.Font = new AnnFont("Arial", 14); 
	batesStamp.Logo.Opacity = 0.5; 
	batesStamp.Logo.StretchLogo = true; 
	batesStamp.Logo.Picture = new AnnPicture(Path.Combine(LEAD_VARS.ImagesDir, "cannon.jpg")); 
	//Add some elements to Bates stamp elements list  
	batesStamp.Elements.Add(new AnnBatesNumber()); 
	batesStamp.Elements.Add(AnnBatesText.Create(" ")); 
	batesStamp.Elements.Add(AnnBatesText.Create(" This is text element")); 
	//Create AnnBatesStampComposer instance and add the created Bates stamp to it  
	AnnBatesStampComposer batesStampComposer = new AnnBatesStampComposer(); 
	//Set the rendering engine  
	AnnBatesStampComposer.RenderingEngine = new AnnWinFormsRenderingEngine(); 
	//Use the main automation object for your application instead of _automation we used here  
	AnnAutomation automation = _automation; 
	AnnContainer mainContainer = automation.Container; 
	//Create Bates stamp container, set its size and mapper and attach it to the composer  
	AnnContainer batesStampContainer = new AnnContainer(); 
	batesStampContainer.Size = mainContainer.Size; 
	batesStampContainer.Mapper = mainContainer.Mapper.Clone(); 
	//Apply Bates Stamp to our container  
	//insert the Bates stamp container below all other containers in the automation   
	automation.Containers.Insert(0, batesStampContainer); 
	//print the content of this Bates stamp  
	Debug.WriteLine(batesStamp.AsString(batesStampContainer)); //  the output will be "000001 This is text element"  
	//Render the containers  
static class LEAD_VARS 
   public const string ImagesDir = @"C:\LEADTOOLS23\Resources\Images"; 

Target Platforms

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Annotations.BatesStamp Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.