POS receipt report using c# complete: Error the network name cannot be found

Поделиться
HTML-код
  • Опубликовано: 10 ноя 2024
  • This video is part of previous lecture • POS receipt report usi...
    Below link can be used to find code used
    www.techsapphir...
    Here solution to error network name cannot be found error is fixed while printing POS reports

Комментарии • 36

  • @carloserosario
    @carloserosario 6 дней назад

    Thanks, I was able to get it to work with minor modifications!

  • @XL1234
    @XL1234 12 часов назад

    thank you.

  • @hasnatqureshi1188
    @hasnatqureshi1188 6 лет назад

    I have AOE mini thermal printer. will this code work with that

  • @andrewpham9116
    @andrewpham9116 Год назад

    Hi, I try your PrinterUtility NutGet work great for 32bits application. But my application build on 32 and 64bits on Visual Studio 2015. Do you have 64bit version? Can I have the source code or buy from you?

    • @techsapphire
      @techsapphire  Год назад

      yes please, kindly reach me at yogesh.mehla@gmail.com

    • @eduardomendescambaza
      @eduardomendescambaza 6 месяцев назад

      @@techsapphire I had some error too. My application build on 32 and 64 bits.

  • @stephendumili1748
    @stephendumili1748 7 лет назад +2

    Hi Sir is there a function that I could check the status of the printer? Eg. out of paper / offline / etc. Upon checking and debugging the code "OpenPrinter" function always return = TRUE even the printer is not power ON. please sir email for the response on.

    • @lifesuccess7376
      @lifesuccess7376 7 лет назад +1

      Nick Marquez have you resolved this

    • @techsapphire
      @techsapphire  6 лет назад

      Hi sorry, I missed this comment. You can query list of printers and check whether it contains your printer. If not, than it is not online. System.Drawing.Printing.PrinterSettings.InstalledPrinters

    • @techsapphire
      @techsapphire  6 лет назад

      Hi, You can query list of printers and
      check whether it contains your printer. If not, than it is not online.
      System.Drawing.Printing.PrinterSettings.InstalledPrinters

  • @darshanthakkar9658
    @darshanthakkar9658 3 года назад

    is this possible to print through the internet for Epson-TM-T88VI?

    • @techsapphire
      @techsapphire  3 года назад

      kindly check ruclips.net/video/MQMD4Pb7jzY/видео.html

    • @darshanthakkar9658
      @darshanthakkar9658 3 года назад

      through cloud@@techsapphire

  • @himanshusingh01
    @himanshusingh01 4 года назад

    Code128 not accepting the http link or the text form of data. Do we need to create own code for the same and if yes, if i create the own barcode and convert into byte[] then will it print?

    • @techsapphire
      @techsapphire  4 года назад

      Use code39 public byte[] Code39(string code)
      {
      int height = 300;
      var command = new List {0x1D, 0x68, (byte)height, 0x1D, 0x77,(byte)2,0x1D, 0x6B, 0x45, (byte)code.Length };
      command.AddRange(code.ToCharArray().Select(x => (byte)x));
      return command.ToArray();
      }

  • @inamullahshah8209
    @inamullahshah8209 5 лет назад +1

    Sir every thing works fine but
    when i give command again it giving error
    Additional information: The process cannot access the file 'C:\Users\User\Desktop\New folder\Help for pos print\Pos print source code\POSPrintExample\bin\Debug\tmpPrint.print' because it is being used by another process.

    • @techsapphire
      @techsapphire  5 лет назад +2

      try this
      public static bool SendValueToPrinter(string szPrinterName, Byte[] BytesValue)
      {
      Byte[] bytes = BytesValue;
      bool bSuccess = false;
      // Your unmanaged pointer.
      IntPtr pUnmanagedBytes = new IntPtr(0);
      int nLength = 0;
      nLength = Convert.ToInt32(bytes.Length);
      // Read the contents of the file into the array.
      // Allocate some unmanaged memory for those bytes.
      pUnmanagedBytes = Marshal.AllocCoTaskMem(nLength);
      // Copy the managed byte array into the unmanaged array.
      Marshal.Copy(bytes, 0, pUnmanagedBytes, nLength);
      // Send the unmanaged bytes to the printer.
      bSuccess = SendBytesToPrinter(szPrinterName, pUnmanagedBytes, nLength);
      // Free the unmanaged memory that you allocated earlier.
      Marshal.FreeCoTaskMem(pUnmanagedBytes);
      return bSuccess;
      }
      //RawPrinterHelper.SendValueToPrinter(PrinterName, BytesValue);

    • @markanthonytuano9365
      @markanthonytuano9365 4 года назад

      Same thing happens to me too

    • @markanthonytuano9365
      @markanthonytuano9365 4 года назад

      by the way the code worked for me
      thanks bro

    • @XL1234
      @XL1234 12 часов назад

      @@techsapphire thank you so much

  • @abdullahsaleem8757
    @abdullahsaleem8757 4 года назад

    Sir I am having an issue. i.e.
    When printer is attached, it does not print anything but if printer is not attached it sends document to the printer queue and when printer is attached, the queue empties without printing anything.
    I tried using "Microsoft Print to PDF" but it generated an empty file.
    Please help me with this issue.

    • @techsapphire
      @techsapphire  4 года назад

      You need actual POS printer to test it. As escpos commands cannot be previewed. Else check ruclips.net/video/osI7P1YdL3o/видео.html

  • @thameeradananjaya6076
    @thameeradananjaya6076 4 года назад

    Barcode does not print with this. Could you please let us know a workaround

  • @janahk229
    @janahk229 5 лет назад

    my epson TM-U220 printer prints but it doesn't apply any styling like fontsize or width or anything.. any idea why it could be ?

    • @techsapphire
      @techsapphire  5 лет назад

      it is kitchen printer and it is dot matrix. Its styling char esc codes are different.

    • @janahk229
      @janahk229 5 лет назад

      @@techsapphire its kitchen printer

    • @janahk229
      @janahk229 5 лет назад

      @@techsapphire what esc codes should i use

    • @techsapphire
      @techsapphire  5 лет назад

      use this reference.epson-biz.com/modules/ref_escpos/index.php?content_id=2

  • @tobbymarchal3140
    @tobbymarchal3140 6 лет назад

    How to print gridview in thermal printer?

    • @techsapphire
      @techsapphire  6 лет назад

      Tobby check this lecture of mine. ruclips.net/video/0mC_yvT3abw/видео.html

  • @tayyabjatoi8644
    @tayyabjatoi8644 5 лет назад

    Thanks for the source code
    I have use source code
    What happening is its printing once
    BUT
    when i give command again it giving error
    Additional information: The process cannot access the file 'C:\Users\User\Desktop\New folder\Help for pos print\Pos print source code\POSPrintExample\bin\Debug\tmpPrint.print' because it is being used by another process.

    • @techsapphire
      @techsapphire  5 лет назад

      Try print with below code, without temp file:
      public static bool SendValueToPrinter(string szPrinterName, Byte[] BytesValue)
      {
      Byte[] bytes = BytesValue;
      bool bSuccess = false;
      // Your unmanaged pointer.
      IntPtr pUnmanagedBytes = new IntPtr(0);
      int nLength = 0;
      nLength = Convert.ToInt32(bytes.Length);
      // Read the contents of the file into the array.
      // Allocate some unmanaged memory for those bytes.
      pUnmanagedBytes = Marshal.AllocCoTaskMem(nLength);
      // Copy the managed byte array into the unmanaged array.
      Marshal.Copy(bytes, 0, pUnmanagedBytes, nLength);
      // Send the unmanaged bytes to the printer.
      bSuccess = SendBytesToPrinter(szPrinterName, pUnmanagedBytes, nLength);
      // Free the unmanaged memory that you allocated earlier.
      Marshal.FreeCoTaskMem(pUnmanagedBytes);
      return bSuccess;
      }
      //RawPrinterHelper.SendValueToPrinter(PrinterName, BytesValue);