Zum Hauptinhalt gehen

Suche

Suche

Cannot Print From My Website

Kommentare

2 Kommentare

  • Avatar
    Legacy Poster

    Hello,

     

    I've change my app pool settings to launch it & the application with an admin account.

    Now there is no more error... but nothing happend in the printer...

     

    The printer is in an office, plugged on network with an IP address

    The IIS Server computer is on the same network & the printer in configured in this server (shared network printer) [Name : Zebra ZXP Series 8]

    In my website ASP.Net here is the code : 

     

    string imprimanteLocation = "\\" + impr.IP + "\" + impr.Name;
    
    //IP = my printer ip adress & Name = Zebra ZXP Series 8
    
    Tools.BarTenderConfiguration btConfig = new Tools.BarTenderConfiguration(imprimanteLocation);
    btConfig.BtwModelePath = Request.PhysicalApplicationPath + @"Content\BarTenderModels\MyModel.btw";
    
    //Parameters for MyModel.btw
    btConfig.addKeyValue(ListKeys[0], "A");
    btConfig.addKeyValue(ListKeys[1], "B");
    
    bool printResult = print(ref uid);
    
    if (printRes)
    {
    //My other request & code 
    }
    else
    {
      throw new Exception(FailPrint);
    }

    & print method

    btEngine = new Engine();
    btEngine.Start();
    				
    if (String.IsNullOrEmpty(btConfig.printer))
    {
      btFormat = btEngine.Documents.Open(BtwModelePath);
    }
      else
    {
      btFormat = btEngine.Documents.Open(BtwModelePath, btConfig.printer);
    }
    
    foreach (KeyValuePair<string, string> pairKeyValue in dictValues)
    {
      SubString objectFromModel = btFormat.SubStrings[pairKeyValue.Key];
      objectFromModel.Value = pairKeyValue.Value;
    }
    				
    btFormat.Print();
    
    if (uid == "00000000")
    {
      uid = ReadRFIDCardWhilePrintingProcess();
    }
    
    btEngine.Stop();
    
    			
    return true; 

     

    The code do the print job without problem... but the print isn't launch... 

     

    Why the job is correctly launch but nothing happend ?

     

    Thanks for help !

    0
  • Avatar
    Legacy Poster

    Anyone can answer me please ?

    Thanks 

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.