AnnBatesStampComposer is the main part for Bates stamping operation as it connects annotations containers with Bates stamp objects.
function lt.Annotations.Documents.AnnBatesStampComposerimplements IDisposable
class lt.Annotations.Documents.AnnBatesStampComposer()implements IDisposable
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.
This example will create Bates stamp object with multiple elements then use the composer to attach the Bates stamp to target container.
example: function SiteLibrary_DefaultPage$example() {//Create AnnBatesStamp and set its propertiesvar 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 listbatesStamp.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 itvar batesStampComposer = new lt.Annotations.Documents.AnnBatesStampComposer();//Set the rendering enginelt.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 herevar automation = _automation;var mainContainer = automation.container;//Create Bates stamp container, set its size and mapper and attach it to the composervar batesStampContainer = new lt.Annotations.Core.AnnContainer();batesStampContainer.size = mainContainer.size;batesStampContainer.mapper = mainContainer.mapper.clone();//Apply Bates Stamp to our containerbatesStampComposer.targetContainers.add(batesStampContainer);//insert the Bates stamp container below all other containers in the automationautomation.containers.insertItem(0, batesStampContainer);//print the content of this Bates stampalert(batesStamp.asString(batesStampContainer)); // the output will be "000001 1/1/0001 2:00:00 AM This is text element"//Render the containersautomation.invalidate(lt.LeadRectD.empty);}