ImageGear .NET v25.2 - Updated
Scanner Settings
Developer Guide > How to Work with... > Common Operations > Scanning > Web-Based Scanning > Scanner Settings

The ImGearIsisScanner showUI method can be used to show a configuration dialog for the scanner, as demonstrated below:

JavaScript Example
Copy Code
           function showUICallback(status) {
               if (status.get_status() !== ImageGear.Web.Isis.ImGearIsisStatus.Completed) {
                   alert(status.get_statusMessage());
               }
           }
           scannerSession.get_scanner().showUI(showUICallback);

The getTag method can be used to get the value of an ISIS tag and the setTagInteger, setTagRational and setTagString methods can be used to set the value of an ISIS tag. The first example below demonstrates getting the string values for the page size tag and adding each to an HTML DOM <select> object named “pageSizeSelect”. The second example demonstrates setting the page size tag to the selected item.

JavaScript Example #1
Copy Code
           function getTagCallback(tagID, tagType, choices, tagValue, status) {
               if (status.get_status() !== ImageGear.Web.Isis.ImGearIsisStatus.Completed) {
                   alert(status.get_statusMessage());
               }
               var pageSizeSelect = document.getElementById(‘pageSizeSelect’);
               // The page sizes are provided as strings. The choices argument contains properties for getting the list of strings, integers, or numerators and denominators or the minimum, maximum, and step values for a range of integers or numerators and denominators. The tagValue argument contains properties for getting the current string value, integer value, or numerator and denominator values. You can check the tagType argument to determine if the tag values are string, integer, or rational. You can check the choiceKind property of the choices argument to determine if the tag values are provided as a range or in a list. See the ASP .NET ISIS sample for more code that demonstrates accessing the getTag callback arguments for different tags.
               var stringList = choices.get_stringList();
               for (var i = 0; i < stringList.get_length(); i++) {
                   var tagString = stringList.getTagString(i);
                   var option = document.createElement(‘option’);
                   option.text = tagString;
                   pageSizeSelect.add(option, null);
               }
           }
           scannerSession.get_scanner().getTag(ImageGear.Web.Isis.ImGearIsisTag.PageSize, 0, getTagCallback);

 

JavaScript Example #2
Copy Code
           function setTagCallback(status) {
               if (status.get_status() !== ImageGear.Web.Isis.ImGearIsisStatus.Completed) {
                   alert(status.get_statusMessage());
               }
           }
           var pageSizeSelect = document.getElementById(‘pageSizeSelect’);
           scannerSession.get_scanner().setTagString(ImageGear.Web.Isis.ImGearIsisTag.PageSize, pageSizeSelect[pageSizeSelect.selectedIndex].value, setTagCallback);

To get or set all of the ISIS tag settings you can use the getAllTags and setAllTags methods, as demonstrated below:

JavaScript Example #1
Copy Code
           var scannerSettings = ‘’;
…
           function getAllTagsCallback(settingString, status) {
               if (status.get_status() !== ImageGear.Web.Isis.ImGearIsisStatus.Completed) {
                   alert(status.get_statusMessage());
               }

               scannerSettings = settingString;
           }
           scannerSession.get_scanner().getAllTags(getAllTagsCallback);

 

JavaScript Example #2
Copy Code
           function setAllTagsCallback(status) {
               if (status.get_status() !== ImageGear.Web.Isis.ImGearIsisStatus.Completed) {
                   alert(status.get_statusMessage());
               }
           }
           scannerSession.get_scanner().setAllTags(scannerSettings, setAllTagsCallback);
Is this page helpful?
Yes No
Thanks for your feedback.