←Select platform

LoadFromString Method

Summary
Loads a Bates stamp composer from a string.
Syntax
C#
C++/CLI
Java
Python
public static AnnBatesStampComposer LoadFromString( 
   string xmlData 
) 
public static AnnBatesStampComposer loadFromString(String xmlData) 
public:  
   static AnnBatesStampComposer^ LoadFromString( 
      String^ xmlData 
   ) 
def LoadFromString(self,xmlData): 

Parameters

xmlData
string containing the XML data of the Bates stamp composer to be loaded. This value must not be null.

Return Value

A new AnnBatesStampComposer object containing all the Bates stamp objects and elements loaded from  xmlData.

Example
C#
using Leadtools.Annotations.Engine; 
using Leadtools.Annotations.Automation; 
using Leadtools.Annotations.Rendering; 
using Leadtools.Annotations.WinForms; 
using Leadtools.Annotations.BatesStamp; 
 
public void AnnBatesStampComposer_SaveLoadToFromString() 
{ 
	//Create Bates stamp object to be used on our test 
	AnnBatesStamp batesStamp = new AnnBatesStamp(); 
	batesStamp.Elements.Add(new AnnBatesNumber()); 
 
	//Create Bates stamp composer that we want to save and load 
	AnnBatesStampComposer composer = new AnnBatesStampComposer(); 
	//Create new container and attach it to the Bates stamp composer to stamp it. 
	AnnContainer batesStampContainer = new AnnContainer(); 
	composer.TargetContainers.Add(batesStampContainer); 
	composer.Stamps.Add(batesStamp); 
 
	//Print the contents of Bates stamp object 
	Debug.WriteLine(composer.Stamps[0].AsString(batesStampContainer)); // the output will be "000001" 
 
	//Save the composer to string then load it again 
	string savedString = AnnBatesStampComposer.SaveToString(composer); 
 
	AnnBatesStampComposer loadedComposer = AnnBatesStampComposer.LoadFromString(savedString); 
	loadedComposer.TargetContainers.Add(batesStampContainer); 
 
	//Print the contents of Bates stamp object again to make sure the load is correct. 
	Debug.WriteLine(loadedComposer.Stamps[0].AsString(batesStampContainer)); // the output will be "000001" 
} 
Requirements

Target Platforms

Help Version 22.0.2023.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 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.