Existing Custom Map pages don't work within maptool after 2015 iPrint updates applied

  • 7016923
  • 20-Oct-2015
  • 20-Oct-2015

Environment

Novell iPrint for Linux

Situation

Custom map pages created prior to the 2015 iPrint updates no longer respond correctly when loaded within the map tool after the updates are applied.  In some cases, IE does not respond.  In other cases, the custom page will load, but dragging a printer icon to the map page results in a disabled printer icon which cannot have printers associated to it.

Resolution

  • Update the iPrint Client
    • Install the iPrint client 6.02 or later on the workstation which will be modify/creating custom map pages.
  • Make a backup copy of the problem HTML file(s)
  • Manually modify the custom HTML page.
    • Open an existing HTML file in some type of text editor like vi, NotePad, gedit, WordPad, etc.
    • Find the open <head> and closing </head> section.
      • See the Additional Information section of this TID for examples of what the <head> section can look like.  Keep in mind there are many possibilities of what text could be within the <head> section.
    • Replace the existing <head> section with the following <head> section:
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <style id="iprint_style">
      #ipp_printer { color: windowtext; font-family: sans-serif; font-size: 10pt; font-style: normal; font-weight: normal; }
</style>
    <link href="styles/iprintappliance.css" rel="stylesheet">
    <script src="scripts/iprint.js">
    </script>
    <script src="../ippdocs/nls/en/iprntmsg.js">
    </script>
  </head>
  <body bgcolor="#ffffff" onload="OnLoadPDisplay();">
    <div id="instruction">
      <div id="instructionHeading">
      </div>
      <div id="instructionContent">
      </div>
    </div>
    <div id="BodyMainDiv" style="position: relative;">
   </head>

  • Save the HTML file
  • Test the results.
    • Load the modified HTML file within the maptool.
      • https://<ip or dns of the iPrint Server>/ippdocs/maptool.htm
    • Drag a printer icon into the page.  If the printer icon is highlighted by a border and you are able to select a printer agent name to associate to it, the change was successful.

Cause

New printer install abilities were released early 2015 which introduced the ability to install printers from additional browser types and browser versions.  This update requires custom map pages to be created in a way different than they were in the past.  Existing map pages need to be modified to fit the new requirements.  This TID documents how to modify those HTML pages so they are compatible with the new map tool technology.

New custom map pages created by the maptool will not require the above manual steps to be taken.

Additional Information

Below are known examples of what type of text can exist within the problematic <head> sections.

Example 1:
  <head>
    <title>
    </title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <style id="iprint_style">
      #ipp_printer { color: windowtext; font-family: sans-serif; font-size: 10pt; font-style: normal; font-weight: normal; }
</style>
  </head>


Example 2:
  <head>
    <title>
    </title>
    <meta content="text/html; charset=UTF-8" http-equiv="content-type">
    <object id="iPrintAccess" classid="clsid:36723f97-7aa0-11d4-8919-FF2D71D0D32C">
    </object>
    </script>
    <//script>
    </ script="">
    <//>
    </ script="">
    <//>
    </>
    <//>
    </ script="">
    <//>
    </>
    <//>
    </>
    <//>
    </>
    <//>
    <script language="JavaScript1.2">
  var browserType = "";
  var startTag = "<";
  var activeXOk = false;

  if(navigator.appName == "Microsoft Internet Explorer")
    browserType= "IE";
  else if(navigator.appName == "Netscape")
    browserType = "Netscape";

  if(browserType == "IE")
  {
    eval('try{var xObj = new ActiveXObject("ienipp.Novell iPrint Control"); if(xObj)activeXOk = true;}catch(e){}');
  }
    </script>
    <script language="JavaScript1.2">
  // *********************************
  // Function: IsCheckRequired
  // *********************************
  function IsCheckRequired()
  {
    var result = true;
    var frameCount = parent.frames.length;

    for(var i = 0; i < frameCount; i++)
    {
      if(parent.frames[i].name == "designframe")
      {
        result = false;
        break;
      }
    }
    return result;
  }

  // *********************************
  // Function: GetValue
  // *********************************
  function GetValue(paramName, string)
  {
    var position;
    var start;
    var end;
    var end1;
    var end2;
    var params;

    params = string;
    position = params.indexOf(paramName);
    if(position != -1)
    {
      start = position + paramName.length + 1;
      end1 = params.indexOf("&", start);
      if(end1 == -1)
        end1 = params.length;

      end2 = params.indexOf("+", start);
      if(end2 == -1)
        end2 = params.length;

      if(end1 < end2)
        end = end1;
      else
        end = end2;

      if(start != end)
        return(params.substring(start, end));
    }

    return("");
  }

  // *********************************
  // Function: CheckForiPrintClient
  // *********************************
  function CheckForiPrintClient()
  {
    if(!IsCheckRequired())
    {
      return;
    }

    if(browserType == "IE")
    {
      if(activeXOk == false)
      {
        ClientIsNotInstalled();
      }
      else
      {
        // Check the version
        var params = "result-type=object"
        var interfaceVersion = iPrintAccess.ExecuteRequest("op-client-interface-version", params);
        interfaceVersion = GetValue("interfaceVersion", interfaceVersion);
        if(interfaceVersion < parent.minimumHtmlClientVersion)
        {
           ClientIsNotInstalled();
        }
      }
    }
    else if(browserType == "Netscape")
    {
      if(CheckForNetscapePlugin() == false)
      {
        ClientIsNotInstalled();
      }
    }
  }

  // *********************************
  // Function: CheckForNetscapePlugin
  // *********************************
  function CheckForNetscapePlugin()
  {
    var i;
    var numPlugins;

    if(navigator.plugins)
    {
      numPlugins = navigator.plugins.length;

      for(i = 0; i < numPlugins; i++)
      {
        if(navigator.plugins[i].name == "npnipp Dynamic Link Library")
          return true;
      }
    }
    return false;
  }

  // *********************************
  // Function: ClientIsNotInstalled
  // *********************************
  function ClientIsNotInstalled()
  {
    // Disable all printer links ...
    for(var i = 0; i < document.links.length; i++)
    {
      document.links[i].href = "JavaScript:InstalliPrintClient();";
    }
  }

  // *********************************
  // Function: InstalliPrintClient
  // *********************************
  function InstalliPrintClient()
  {
    if(confirm("The iPrint Client is not installed. Do you wish to install the iPrint Client now?"))
    {
      document.location.replace("nipp.exe");
    }
  }
    </script>
    <style id="iprint_style">
      #ipp_printer { FONT-STYLE: normal; FONT-FAMILY: sans-serif; COLOR: windowtext; FONT-SIZE: 10pt; FONT-WEIGHT: normal }
    </style>
  </head>

Feedback service temporarily unavailable. For content questions or problems, please contact Support.