ScanDocument StoreScanDocument

ScanDocuments can be saved either in the marking device or in the host computer for future access. When a ScanDocument is saved, it can be retrieved and scanned directly using the "StartScanning" command.

Overloads

public void StoreScanDocument(StoredScanDocumentEntry scanDocumentEntry)
public void StoreScanDocument(Stream stream)

 

Return value

void  

 

Parameters

StoredScanDocumentEntry scanDocumentEntry Specify the attributes of the saved file
Stream stream A System.IO.Stream object to which the file will be written.

 

Exceptions

ArgumentException Throws if the saving location set to device and if the device is offline

 

Example

Copy
string deviceName = GetselectedDeviceUniqueName();
scanDocument = scanDeviceManager.CreateScanDocument(deviceName, DistanceUnit.Millimeters, false);

if (scanDocument != null)
{
    VectorImage vectorImage = scanDocument.CreateVectorImage("image1", DistanceUnit.Millimeters);

    vectorImage.SetMarkSpeed(1000);
    vectorImage.SetJumpSpeed(2000);
    vectorImage.SetJumpDelay(100);
    vectorImage.SetMarkDelay(100);

    //Set Laser Delays
    vectorImage.SetLaserOnDelay(10);
    vectorImage.SetLaserOffDelay(10);

    CircleShape circleShape = new CircleShape();
    circleShape.CenterPoint.X = 0.0f;
    circleShape.CenterPoint.Y = 0.0f;
    circleShape.CenterPoint.Z = 0.0f;
    circleShape.Clockwise = true;
    circleShape.Radius = 10;
    circleShape.StartAngle = 0;
    circleShape.MaximumSegmentationError = 0.001f;

    vectorImage.AddCircle(circleShape);

    StoredScanDocumentEntry storedJobEntry = new StoredScanDocumentEntry("Sample1", StorageLocation.Flash);
    scanDocument.StoreScanDocument(storedJobEntry);


    scanDocument.Scripts.Add(new ScanningScriptChunk("defaultScript", "ScanAll()"));
    try
    {
        scanDocument.StartScanning();
    }
    catch
    {

    }
}