דילוג לתוכן
  • דף הבית
  • קטגוריות
  • פוסטים אחרונים
  • משתמשים
  • חיפוש
  • חוקי הפורום
כיווץ
תחומים

תחומים - פורום חרדי מקצועי

💡 רוצה לזכור קריאת שמע בזמן? לחץ כאן!
  1. דף הבית
  2. חומרה
  3. חנות שמוכרת מדפסות עם תמיכה

חנות שמוכרת מדפסות עם תמיכה

מתוזמן נעוץ נעול הועבר חומרה
8 פוסטים 3 כותבים 304 צפיות
  • מהישן לחדש
  • מהחדש לישן
  • הכי הרבה הצבעות
התחברו כדי לפרסם תגובה
נושא זה נמחק. רק משתמשים עם הרשאות מתאימות יוכלו לצפות בו.
  • ח מנותק
    ח מנותק
    חוקר
    כתב ב נערך לאחרונה על ידי
    #1

    אני מחפש חנות ישראלית שאוכל לקנות שם מדפסת תרמית עם ליווי בכל נושא הדרייברים והחומרה ועד לתוצאה שאוכל להדפיס קבלות בעברית ללא בעיות.
    מישהו מכיר חנות כזו?

    אוקיי נטא clickoneC 2 תגובות תגובה אחרונה
    0
    • אוקיי נטא מנותק
      אוקיי נטא מנותק
      אוקיי נט
      השיב לחוקר ב נערך לאחרונה על ידי
      #2

      @חוקר יכול לפנות אליי בשמחה

      תגובה 1 תגובה אחרונה
      1
      • clickoneC מנותק
        clickoneC מנותק
        clickone
        השיב לחוקר ב נערך לאחרונה על ידי
        #3

        @חוקר
        מנסיון בעבר אם אתה מתכנן תוכנה של ווינדוס שתדפיס למדפסת תרמית 80 ממ - כל מדפסת תרמית שמתחברת בUSB (ויהא עוברת דרך הספולר) תהיה טובה ותעבוד מהקופסא.

        היה לי בעבר (לפני כ10 שנים) כזו מדפסת בשביל לקוח, זה היה מאד פשוט וקל.

        אם זה אנדרואיד המצב קצת שונה

        אין טסט כמו פרודקשן.

        המייל שלי urivpn@gmail.com

        ח תגובה 1 תגובה אחרונה
        2
        • ח מנותק
          ח מנותק
          חוקר
          השיב לclickone ב נערך לאחרונה על ידי
          #4

          @clickone
          אתה מדבר על הדפסה גולמית של סט פקודות המתאימה למדפסת קופה או הכנת קובץ PDF והדפסתו כקובץ רגיל במדפסת לאחר התקנת הדרייבר?

          clickoneC תגובה 1 תגובה אחרונה
          0
          • clickoneC מנותק
            clickoneC מנותק
            clickone
            השיב לחוקר ב נערך לאחרונה על ידי clickone
            #5

            @חוקר
            הדפסה של קובץ רגיל - PDF / וורד / דוח מאקסס. וכו'
            הדבר היחיד שנראה לי שהייתי צריך להגדיר זה שהרוחב הוא 80ממ, אחרת הוא הדפיס כל דף כמה פעמים (כל 80 ממ לרוחב הדף, ואז ה80ממ הבאים)
            וזה בשונה ממדפסת רגילה שבה אתה יכול להגדיר דף ברוחב מלא ואת התוכן שלך לשים באמצע ולהדפיס שיק צר לדוגמא)

            כמובן שאם תרצה לעבוד מול סט פקודות אני מניח שזה אפשרי - אבל לא התנסתי בזה כ"כ (רק התנסתי לשלוח פקודה כדי לפתוח את מגירת הקופה שהיתה משורשרת למדפסת)

            אין טסט כמו פרודקשן.

            המייל שלי urivpn@gmail.com

            ח תגובה 1 תגובה אחרונה
            2
            • ח מנותק
              ח מנותק
              חוקר
              השיב לclickone ב נערך לאחרונה על ידי
              #6

              @clickone אמר בחנות שמוכרת מדפסות עם תמיכה:

              כמובן שאם תרצה לעבוד מול סט פקודות אני מניח שזה אפשרי - אבל לא התנסתי בזה כ"כ (רק התנסתי לשלוח פקודה כדי לפתוח את מגירת הקופה שהיתה משורשרת למדפסת)

              זה אפשרי אבל העברית לא נתמך לי
              אז זהו שהתייאשתי ועברתי לקנבס-PDF עם הדפסת קובץ מוכן וסגור מראש ולא עם פקודת מדפסת.
              איך שלחת את הפקודות? באיזה דרייברים/סגנון עבודה עשית את זה?

              clickoneC תגובה 1 תגובה אחרונה
              0
              • clickoneC מנותק
                clickoneC מנותק
                clickone
                השיב לחוקר ב נערך לאחרונה על ידי clickone
                #7

                @חוקר

                הקוד בגדול מגוגל... (רק הייתי צריך למצוא את הבאפר הנכון) - אני רואה שזה היה עם API של הווינדוס
                מצורף:
                מימוש:

                            PrinterSettings settings = new PrinterSettings();
                            Console.WriteLine(settings.PrinterName);
                            OpenCashDrawer.OpenDrawer("");
                

                הקלאס הסטטי:

                using System;
                using System.Collections.Generic;
                using System.IO;
                using System.Runtime.InteropServices;
                using System.Text;
                
                namespace OpenCashDrawer
                {
                    class OpenCashDrawer
                    {
                        public static void OpenDrawer(string printerName)
                        {
                            byte[] buffer = new byte[5]
                                {
                                  (byte) 27,
                                  (byte) 112,
                                  (byte) 0,
                                  (byte) 25,
                                  (byte) 250
                                };
                            RawPrinterHelper.SendStringToPrinter(printerName, System.Text.Encoding.UTF8.GetString(buffer));
                
                        }
                
                    }
                
                     class RawPrinterHelper
                    {
                        // Structure and API declarions:
                        [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
                        public class DOCINFOA
                        {
                            [MarshalAs(UnmanagedType.LPStr)]
                            public string pDocName;
                            [MarshalAs(UnmanagedType.LPStr)]
                            public string pOutputFile;
                            [MarshalAs(UnmanagedType.LPStr)]
                            public string pDataType;
                        }
                        [DllImport("winspool.Drv", EntryPoint = "OpenPrinterA", SetLastError = true, CharSet = CharSet.Unicode, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
                        public static extern bool OpenPrinter([MarshalAs(UnmanagedType.LPStr)] string szPrinter, out IntPtr hPrinter, IntPtr pd);
                
                        [DllImport("winspool.Drv", EntryPoint = "ClosePrinter", SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
                        public static extern bool ClosePrinter(IntPtr hPrinter);
                
                        [DllImport("winspool.Drv", EntryPoint = "StartDocPrinterA", SetLastError = true, CharSet = CharSet.Unicode, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
                        public static extern bool StartDocPrinter(IntPtr hPrinter, Int32 level, [In, MarshalAs(UnmanagedType.LPStruct)] DOCINFOA di);
                
                        [DllImport("winspool.Drv", EntryPoint = "EndDocPrinter", SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
                        public static extern bool EndDocPrinter(IntPtr hPrinter);
                
                        [DllImport("winspool.Drv", EntryPoint = "StartPagePrinter", SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
                        public static extern bool StartPagePrinter(IntPtr hPrinter);
                
                        [DllImport("winspool.Drv", EntryPoint = "EndPagePrinter", SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
                        public static extern bool EndPagePrinter(IntPtr hPrinter);
                
                        [DllImport("winspool.Drv", EntryPoint = "WritePrinter", SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)]
                        public static extern bool WritePrinter(IntPtr hPrinter, IntPtr pBytes, Int32 dwCount, out Int32 dwWritten);
                
                        // SendBytesToPrinter()
                        // When the function is given a printer name and an unmanaged array
                        // of bytes, the function sends those bytes to the print queue.
                        // Returns true on success, false on failure.
                        public static bool SendBytesToPrinter(string szPrinterName, IntPtr pBytes, Int32 dwCount)
                        {
                            Int32 dwError = 0, dwWritten = 0;
                            IntPtr hPrinter = new IntPtr(0);
                            DOCINFOA di = new DOCINFOA();
                            bool bSuccess = false; // Assume failure unless you specifically succeed.
                
                            di.pDocName = "RAW Document";
                            // Win7
                            di.pDataType = "RAW";
                
                            // Win8+
                            // di.pDataType = "XPS_PASS";
                
                            // Open the printer.
                            if (OpenPrinter(szPrinterName.Normalize(), out hPrinter, IntPtr.Zero))
                            {
                                // Start a document.
                                if (StartDocPrinter(hPrinter, 1, di))
                                {
                                    // Start a page.
                                    if (StartPagePrinter(hPrinter))
                                    {
                                        // Write your bytes.
                                        bSuccess = WritePrinter(hPrinter, pBytes, dwCount, out dwWritten);
                                        EndPagePrinter(hPrinter);
                                    }
                                    EndDocPrinter(hPrinter);
                                }
                                ClosePrinter(hPrinter);
                            }
                            // If you did not succeed, GetLastError may give more information
                            // about why not.
                            if (bSuccess == false)
                            {
                                dwError = Marshal.GetLastWin32Error();
                            }
                            return bSuccess;
                        }
                
                        public static bool SendFileToPrinter(string szPrinterName, string szFileName)
                        {
                            // Open the file.
                            FileStream fs = new FileStream(szFileName, FileMode.Open);
                            // Create a BinaryReader on the file.
                            BinaryReader br = new BinaryReader(fs);
                            // Dim an array of bytes big enough to hold the file's contents.
                            Byte[] bytes = new Byte[fs.Length];
                            bool bSuccess = false;
                            // Your unmanaged pointer.
                            IntPtr pUnmanagedBytes = new IntPtr(0);
                            int nLength;
                
                            nLength = Convert.ToInt32(fs.Length);
                            // Read the contents of the file into the array.
                            bytes = br.ReadBytes(nLength);
                            // 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);
                            fs.Close();
                            fs.Dispose();
                            fs = null;
                            return bSuccess;
                        }
                        public static bool SendStringToPrinter(string szPrinterName, string szString)
                        {
                            IntPtr pBytes;
                            Int32 dwCount;
                            // How many characters are in the string?
                            dwCount = szString.Length;
                            // Assume that the printer is expecting ANSI text, and then convert
                            // the string to ANSI text.
                            pBytes = Marshal.StringToCoTaskMemAnsi(szString);
                            // Send the converted ANSI string to the printer.
                            SendBytesToPrinter(szPrinterName, pBytes, dwCount);
                            Marshal.FreeCoTaskMem(pBytes);
                            return true;
                        }
                
                    }
                
                }
                
                

                אין טסט כמו פרודקשן.

                המייל שלי urivpn@gmail.com

                ח תגובה 1 תגובה אחרונה
                2
                • ח מנותק
                  ח מנותק
                  חוקר
                  השיב לclickone ב נערך לאחרונה על ידי
                  #8

                  @clickone
                  טוב בינתיים בשבילי זה סינית..
                  (ואגב הביטוי שזה סינית לא אומר שהוא לא ניתן להבנה, אם אלמד את השפה הסינית אני יבין את זה, גם כאן אם אלמד C# אני אוכל להבין את זה).
                  חלק מהקושי הוא שאני מכין את ההדפסה בצד השרת ואני מתלבט איך זה יודפס במקום ללא פתיחת דו שיח הדפסה - ממשק הניהול הינו בדפדפן.
                  לכאורה אני יעבוד כך, אצור את הPDF עם פרטי המסמך בשרת שלי ואשלח אותו למדפסת על ידי השירות של printnode ואח"כ אשלח פקודה גולמית שוב על ידי השירות רק עבור פתיחת מגירת המזומנים (הפקודה '\x1b\x70\x00\x19\xfa').
                  בשטח עצמו המדפסת תיהיה מחוברת למחשב שאתקין עליו את השירות הנ"ל.

                  חשבתי שאם יילך בקלות דרך אחרת לחסוך את השירות החיצוני עדיף, אבל בינתיים נראה לי מסובך מידי.

                  תגובה 1 תגובה אחרונה
                  1

                  בא תתחבר לדף היומי!
                  • התחברות

                  • אין לך חשבון עדיין? הרשמה

                  • התחברו או הירשמו כדי לחפש.
                  • פוסט ראשון
                    פוסט אחרון
                  0
                  • דף הבית
                  • קטגוריות
                  • פוסטים אחרונים
                  • משתמשים
                  • חיפוש
                  • חוקי הפורום