GetUniqueOptionsSupported() example

GetUniqueOptionsSupported() example

  1. bool PluginMain::GetUniqueOptionsSupported(CString DeviceId, CString & XML)
  2. {
  3.   PluginCallLogger LogCall("PluginMain::GetUniqueOptionsSupported(\"%s\", ...)", (LPCSTR)DeviceId);
  4.     //if our base class is not happy with this call...
  5.   if (PluginBase::GetUniqueOptionsSupported(DeviceId, XML) != true) 
  6.     return false;

  7.   XmlFileInfo XmlWriter;
  8.   CString XmlPathTop;
  9.   CString XmlSectionPath;   
  10.   CString XmlValuePath;   
  11.    
  12.   XmlWriter.Clear();  //clear values
  13.   XmlWriter.AddContainer("/UniqueOptions", XmlPathTop);
  14.  
  15.   XmlWriter.AddContainer(XmlPathTop + "/Imaging", XmlSectionPath);        //add image option section
  16.  
  17.   XmlWriter.AddContainer(XmlSectionPath + "/GrayscaleAndColorResolution", XmlValuePath);    //value name
  18.   XmlWriter.AddValue(XmlValuePath, "DisplayName", "Grayscale/Color Resolution"); 
  19.   XmlWriter.AddValue(XmlValuePath, "ValueType", "List"); 
  20.   XmlWriter.AddValue(XmlValuePath, "Values", "100,200,240,300");
  21.   XmlWriter.AddValue(XmlValuePath, "DefaultValue", "100");   //the default resolution for grayscale and color images should be 100 dpi
  22.   XmlWriter.AddValue(XmlValuePath, "Help", "Resolution for both grayscale and color images in dots per inch."); 
  23.   XmlWriter.AddContainer(XmlSectionPath + "/Brightness", XmlValuePath);    //value name
  24.   XmlWriter.AddValue(XmlValuePath, "DisplayName", "Image Brightness"); 
  25.   XmlWriter.AddValue(XmlValuePath, "ValueType", "Range"); 
  26.   XmlWriter.AddValue(XmlValuePath, "Values", "0-255,1");  //0 to 255, increment = 1
  27.   XmlWriter.AddValue(XmlValuePath, "DefaultValue", "128");
  28.   XmlWriter.AddValue(XmlValuePath, "Help", "Brightness of the image. Higher values make the image lighter."); 
  29.  
  30.   XmlWriter.AddContainer(XmlSectionPath + "/FrontJpegQuality", XmlValuePath);    //value name
  31.   XmlWriter.AddValue(XmlValuePath, "DisplayName", "Front JPEG Quality"); 
  32.   XmlWriter.AddValue(XmlValuePath, "ValueType", "Range"); 
  33.   XmlWriter.AddValue(XmlValuePath, "Values", "5-95,1");  //5 to 95, increment = 1
  34.   XmlWriter.AddValue(XmlValuePath, "DefaultValue", "75");
  35.   XmlWriter.AddValue(XmlValuePath, "Help", "Higher values yield a higher image quality."); 
  36.  
  37.   XmlWriter.AddContainer(XmlSectionPath + "/RearJpegQuality", XmlValuePath);    //value name
  38.   XmlWriter.AddValue(XmlValuePath, "DisplayName", "Rear JPEG Quality"); 
  39.   XmlWriter.AddValue(XmlValuePath, "ValueType", "Range"); 
  40.   XmlWriter.AddValue(XmlValuePath, "Values", "5-95,1");  //5 to 95, increment = 1
  41.   XmlWriter.AddValue(XmlValuePath, "DefaultValue", "75");
  42.   XmlWriter.AddValue(XmlValuePath, "Help", "Higher values yield a higher image quality.");   
  43.    
  44.   XmlWriter.Write(XML);
  45.   return true;
  46. }

Ranger® - The universal check scanner interface
Copyright © 2023 Silver Bullet Technology
www.sbullet.com

    • Related Articles

    • Should Ranger call my GetUniqueOptionsSupported() function?

      No, Ranger does not call GetUniqueOptionsSupported(). However, applications such as RangerFlex may call this function to determine which unique options are available. Ranger® - The universal check scanner interface Copyright © 2023 Silver Bullet ...
    • Why can I not view tiff images from Ranger in the Windows XP operating system?

      The image viewer in Windows XP will not display JPEG (in TIFF) images. Options for working around this issue include the use of another image viewer that supports this image type or changing the image format used for grayscale images. IrfanView is an ...
    • How do I use Ranger with Java?

      Using Ranger with Java (not Javascript) There is a Java interface, JNI, for Ranger called JRanger. It can be found on our website after logging in and selecting the "Ranger SDK" link. Because Ranger and the drivers that Ranger uses are 32 bit you ...
    • How can I endorse text on items?

      The general approach is the following: 1. Check that the endorser is present in the "TransportInfo.ini" file. If the feature is not present then endorsing is not possible. Example of TransportInfo.ini: [General] RearEndorserPresent = true ...
    • How do I grab Panini logs from RangerFlex on the MAC?

      To grab Panini logs on the MAC using RangerFlex: Open the Terminal. Navigate to ...RangerFlex.app/Contents/MacOS/RangerFlex Drag and drop the "RangerFlex" binary to the terminal. The exact binary location will appear in the terminal. Example: ...