AnnBatesStampComposer Object

Summary

AnnBatesStampComposer is the main part for Bates stamping operation as it connects annotations containers with Bates stamp objects.

Syntax

JavaScript Syntax
function lt.Annotations.Documents.AnnBatesStampComposer 
	implements IDisposable 
TypeScript Syntax
class lt.Annotations.Documents.AnnBatesStampComposer() 
	implements IDisposable 

Remarks

Use this composer to add target containers to apply Bates stamps to.

It allows the addition of AnnBatesStamp objects. Also this composer have ability to save and load the Bates stamp list.

Example

This example will create Bates stamp object with multiple elements then use the composer to attach the Bates stamp to target container.

JavaScript Example
example: function SiteLibrary_DefaultPage$example() { 
   //Create AnnBatesStamp and set its properties 
   var batesStamp = new lt.Annotations.Documents.AnnBatesStamp(); 
   batesStamp.font = new lt.Annotations.Core.AnnFont("Arial", 12); 
   batesStamp.foreground = lt.Annotations.Core.AnnSolidColorBrush.create("Red"); 
   batesStamp.horizontalAlignment = lt.Annotations.Core.AnnHorizontalAlignment.center; 
   batesStamp.verticalAlignment = lt.Annotations.Core.AnnVerticalAlignment.center; 
   batesStamp.logo.angle = 45; 
   batesStamp.logo.font = new lt.Annotations.Core.AnnFont("Arial", 14); 
   batesStamp.logo.opacity = 0.5; 
   batesStamp.logo.stretchLogo = true; 
   batesStamp.logo.picture = new lt.Annotations.Core.AnnPicture("cannon.jpg"); 
    
   //Add some elements to Bates stamp elements list 
   batesStamp.elements.add(new lt.Annotations.Documents.AnnBatesNumber()); 
   batesStamp.elements.add(lt.Annotations.Documents.AnnBatesText.create(" ")); 
   batesStamp.elements.add(new lt.Annotations.Documents.AnnBatesDateTime()); 
   batesStamp.elements.add(lt.Annotations.Documents.AnnBatesText.create(" This is text element")); 
    
   //Create AnnBatesStampComposer instance and add the created Bates stamp to it 
   var batesStampComposer = new lt.Annotations.Documents.AnnBatesStampComposer(); 
   //Set the rendering engine 
   lt.Annotations.Documents.AnnBatesStampComposer.renderingEngine = new lt.Annotations.Rendering.AnnHtml5RenderingEngine(); 
   batesStampComposer.stamps.add(batesStamp); 
    
   //Use the main automation object for your application instead of _automation we used here 
   var automation = _automation; 
   var mainContainer = automation.container; 
 
   //Create Bates stamp container, set its size and mapper and attach it to the composer 
   var batesStampContainer = new lt.Annotations.Core.AnnContainer(); 
   batesStampContainer.size = mainContainer.size; 
   batesStampContainer.mapper = mainContainer.mapper.clone(); 
 
   //Apply Bates Stamp to our container 
   batesStampComposer.targetContainers.add(batesStampContainer); 
 
   //insert the Bates stamp container below all other containers in the automation  
   automation.containers.insertItem(0, batesStampContainer); 
 
   //print the content of this Bates stamp 
   alert(batesStamp.asString(batesStampContainer)); //  the output will be "000001 1/1/0001 2:00:00 AM This is text element" 
 
   //Render the containers 
   automation.invalidate(lt.LeadRectD.empty); 
} 

Requirements

Target Platforms

Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
Leadtools.Annotations.Documents Assembly
Click or drag to resize