Click or drag to resize

Settings For Web Scanning And Add Document Wizard

Several functions in the web client user interface are designed to operate integrated with another application. Three of these functions can have their options modified using the SetSettings method of the ScanningManager web service.

Scanner settings are used with the web viewing, web scanning, and add document wizard forms of the product. Each of these forms can be called directly from an external application. This method makes it possible for the external application to preset various values for controlling the behavior and responses on the form. The possible keys and values are dependent on the form that will be called.

Each form has an optional return page that can be defined. This can be blank or a relative or fully qualified URL. If the option is blank or unset there will be no return button on the form. If the option is set there will be return button. When the user presses the return button the form will immediately redirect to the defined page. If the URL option relative it will be executed in the context of the web client.

These optional return page values can also be statically defined in the web client web config file. If an invalid URL is provided, the user will see the typical web server or browser error for an invalid page.


Form name

Return page key

Web viewing



Web scanning



Add document wizard



Additional options are available for the web scanning and add document wizard forms. These values are not validated when the call to SetSettings is made. They are accepted as is until processed by the receiving form as though they were user input.





Specify the destination location for the document in the form of a comma separated list of library location ids as <cabinet id>,<drawer id>,<folder id>. For example, where the cabinet id is 10, the drawer id is 37, and the folder id is 428 the value would be 10,37,428.



Set the value to true to prevent the user from editing values on the library location or metadata page. The default value is false. Note that user editing of metadata will only be in effect for the user interface of the scanner inbox or add document wizard.



Specify if auto-filing should be used instead of a direct location setting. The value is either true or false. A true value will effectively override the folder key.



The id of the document schema that will be used for filing the document. This must be a valid value for an electronic document or electronic record for the user.



A serialized two-dimensional array of metadata field ids and values. The metadata fields and values must be valid for the document schema selected.



Set true to remove the first page from the scanned document or false to keep the first page.



Set true to clear the scanning inbox after the document is submitted.



For bi-level (black and white) scans, the compression options are NoCompression, Group3FaxEncoding, Group4FaxEncoding, or Lzw.



For color scans, the compression options are NoCompression, Lzw, JpegCompression:25, JpegCompression:50, JpegCompression:75, or JpegCompression:90.



The file format that should be used when the scan is saved: TIFF or PDF.



Set the value to true to add an offline document or false to add an electronic document.

Add document


Set the value to true to use the current date and time as the name of an offline document or false to use a name specified by the user. This value is ignored for electronic documents.

Add document


Set the value to true to list document schemas that are not offline by default when adding an offline document or false to only list offline schemas. This value is ignored for electronic documents.

Add document

The following sample code updates the values of three metadata fields, the web scanning return page, and enables auto filing in preparation for opening the web scanning page.

 1// set the document schema ID 
 2// - schema ids can be retrieved with DocumentSchemaManager.GetElectronicSchemaList() 
 3int documentSchemaId = 123; 
 5// create and fill an array of metadata fields 
 6// - metadata field ids can be retrieved with DocumentSchemaManager.GetDocumentSchemaFields() 
 7ScanningManagerService.FieldWithValue[] fields = new ScanningManagerService.FieldWithValue[ 3 ]; 
 8fields[ 0 ] = new ScanningManagerService.FieldWithValue() { FieldId = 1234, FieldValue = "Value1" }; 
 9fields[ 1 ] = new ScanningManagerService.FieldWithValue() { FieldId = 1235, FieldValue = "Value2" }; 
10fields[ 2 ] = new ScanningManagerService.FieldWithValue() { FieldId = 1236, FieldValue = new int[] { 5 } }; // dropdown field
12// serialize the array of metadata fields to an XML string 
13System.Xml.Serialization.XmlSerializer serializer = new System.Xml.Serialization.XmlSerializer(
14  typeof( ScanningManagerService.FieldWithValue[] ),
15  new Type[] { typeof( int[] ) } ); // register the array of integers as a known type
16System.IO.MemoryStream stream = new System.IO.MemoryStream(); 
17serializer.Serialize( stream, fields ); 
18byte[] bytes = stream.ToArray(); 
19string serializedMetadata = System.Text.Encoding.UTF8.GetString( bytes ); 
21// set the return page URL 
22string returnPage = ""; 
24// create and authenticate a reference to the ScanningManager service 
25ScanningManagerService.ScanningManager manager = new ScanningManagerService.ScanningManager(); 
26FileHold.Common.Authentication.AuthenticateService( manager ); 
28// create and fill an array of settings 
29ScanningManagerService.ScanningSetting[] settings = new ScanningManagerService.ScanningSetting[ 4 ]; 
30settings[ 0 ] = new ScanningManagerService.ScanningSetting { Key = "DocumentSchemaId", Value = documentSchemaId.ToString() }; 
31settings[ 1 ] = new ScanningManagerService.ScanningSetting { Key = "MetadataValues", Value = serializedMetadata }; 
32settings[ 2 ] = new ScanningManagerService.ScanningSetting { Key = "Inbox_ReturnPage", Value = returnPage }; 
33settings[ 3 ] = new ScanningManagerService.ScanningSetting { Key = "AutoFile", Value = "True" }; 
35// pass settings to the Scanning Manager service 
36manager.SetSettings( settings );