mehmet ali iyikülah Posted April 7, 2022 Share Posted April 7, 2022 Merhabalar, zebra yazıcılardan barkod çıkarma işlemi üzerinde çalışıyorum. Fast report üzerinden tasarımı yaptım. Client ekranında etiket bas butonuna bastığımda yazıcıdan çıktı almak istiyorum, serverdan yaptığım zaman hiç bir problem olmadan alıyorum çünkü yazıcı yolu belirledim. fakat Client ile ilgili bir yol bulamadım. (yazıcı paylaşımı yapmak istemiyorum.) . Bununla ilgili önerebileceğiniz bir metot var mı acaba .? Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted April 9, 2022 Share Posted April 9, 2022 Merhaba Bu işin en kolay yolu yazıcı için bir servis yazmak Client yazdırmak istediğinde veritabanına bir kayıt ekler. Yazıcı servisi de belirli aralıklarda tabloyu kontol eder ve yazdırma işlemini gerçekleştirir Quote Link to comment Share on other sites More sharing options...
mehmet ali iyikülah Posted April 12, 2022 Author Share Posted April 12, 2022 Dediğiniz işlemi denedim Rest server ile fakat yavaş kaldığı için işlemden vazgeçtim. javascript ile dosya yoluna gönderme gibi bir yolu var mıdır ? Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted April 12, 2022 Share Posted April 12, 2022 Merhaba Hangi versiyonu ve sürümü kullanıyorsunuz? Quote Link to comment Share on other sites More sharing options...
mehmet ali iyikülah Posted April 13, 2022 Author Share Posted April 13, 2022 merhaba 1.9.1548_used lisanslı sürüm Delphi 10.3.3 Quote Link to comment Share on other sites More sharing options...
asapltda Posted November 23, 2023 Share Posted November 23, 2023 zebra Barkod Basım işlemi Good morning I manage to print from my mobile ? How do I do it? Thank you Quote Link to comment Share on other sites More sharing options...
sinanaydin Posted February 28 Share Posted February 28 websocket ile yapabilirsiniz . local makinada örnek olarak 8021 portu açık olacak siz javascript ile bu porta gideceksiniz. base64 olarak istediğiniz veriyi yollayacaksınız websocket de ki servis ile de bu veriyi açıp yazdıracaksınız. 2.ci yöntem aynı local ağ da çalışıyorsa bir klasöre txt olarak kaydedebilir bunu barkod yazıcıya cmd ile yollayabilirsiniz bunu yapabilmeniz için barkod cihazının paylaşıma açık olması gerekli Quote Link to comment Share on other sites More sharing options...
mehmet ali iyikülah Posted February 29 Author Share Posted February 29 2. yöntemi delphi de uzun yıllardır. copy ../etiket.prn //bilgisayaradi/yazıcıpaylasimadi olarak kullanıyoruz. fakat local ağda denedik stabil bir şekilde çalışmadı ara ara kesilmeler , problemler yaşadık. restapi ile delphi uygulaması yazdık onunla haberleştirdik, sorunu böyle çözdük. Dolayısıyla ilk sözlediğiniz yöntemi biraz daha açıklar mısınız? Quote Link to comment Share on other sites More sharing options...
mirod Posted March 1 Share Posted March 1 Basit ama etkili bir yazdırma sunucusu. Mantık olarak unigui üzerinden lokal ip yi kontrol ettiriyorum daha sonra yazıcı ismini alıyorum daha sonra rest sunucusuna fastreportdan aldığım pdf verisine gönderiyorum. unit PrinterServerMethodsUnit; interface uses System.SysUtils, System.Classes, Datasnap.DSServer, Datasnap.DSAuth, Printers, IdBaseComponent, IdComponent, IdIPWatch, WinSpool, ShellAPI, gtPDFDoc, gtPDFPrinter, Types; type {$METHODINFO ON} PrinterServerMethods = class(TComponent) private { Private declarations } function GetLocalIp: string; public { Public declarations } function Connect(ip: string): Boolean; function GetPrinterName: string; function Print(data: TStream): Boolean; end; {$METHODINFO OFF} implementation uses System.StrUtils; function PrinterServerMethods.Connect(ip: string): Boolean; begin if ip = GetLocalIp then Result := True else Result := False; end; function PrinterServerMethods.GetLocalIp: string; var IPW: TIdIPWatch; begin IPW := TIdIPWatch.Create(nil); try if IPW.LocalIP <> '' then Result := IPW.LocalIP; finally IPW.Free; end; end; function PrinterServerMethods.GetPrinterName: string; begin if (Printer.Printers.Count > 0) then begin Printer.PrinterIndex := -1; Result := Printer.Printers[Printer.PrinterIndex]; end else begin Result := ''; end; end; function PrinterServerMethods.Print(data: TStream): Boolean; var pdf: TgtPDFDocument; pdf_printer: TgtPDFPrinter; begin try try pdf := TgtPDFDocument.Create(Self); pdf_printer := TgtPDFPrinter.Create(Self); pdf.LoadFromStream(data); pdf_printer.PDFDocument := pdf; pdf_printer.SelectPrinterByName(GetPrinterName); pdf_printer.ShowSetupDialog := False; pdf_printer.PrintDoc; Result := True; finally pdf.Free; pdf_printer.Free; end; except on e: exception do begin Result := False; end; end; end; end. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 1 Share Posted March 1 @mehmet ali iyikülah @mirod Sorry, which edition and build of uniGUI are you using? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.