DagSa Posted November 18, 2016 Posted November 18, 2016 I have a project to print a prn printfile to a barcode printer. File is both binary (fonts and pictures) and text mixed in a format understandable for the printer. I need some advice about the methode to deal and use windows printer spooler. The printers could be connected in network or localy by USB, so easiest is to make that connection by windows. I have not found any easy way to print in the site, just how to setup a new printer or change parameters. I thought printing was the easy part. My program should be used by windows vista, 7, 8 and 10 and sometime in POS environment. Right now I print by FTP to CAB printers, but its not always accepted in some networks or by firewalls. I need to change it, and also be open to use other printers. The option I have seen is windows LPR command, but I dont know if its usable in all windows versions or if it behave different. I tested it from cmd.exe, but have not succeded for the printers I normaly use. Copy to LPT or COM is also an alternative. DIsadvantage is I need to change in driver to connect LPT/COM to the printer and not userfriendly to install. I want a solid solution, not complicated for the user and easy to understand and maintain. Just a procedure in Auto-IT like 'Print ("Printer name", "File")' to put it in the que, and leave the printer maintain to windows. Any ideas or considirations? Where to begin? (soory for the speling, not my naitive language)
Developers Jos Posted November 18, 2016 Developers Posted November 18, 2016 (edited) LPR should work fine. Just: install the UNIX printing service on the computer to which the printer is attached Create a local printer to create the queue with an easy name: printer1 Use the LPR command to print to itfrom the remote computer: LPR IPADDRESS printer1 Jos Edited November 18, 2016 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
DagSa Posted November 18, 2016 Author Posted November 18, 2016 Support for LPR and LPD is swiched on now (use win 7 -64). Do I need to make a new local printer? The normal I use isnt enought? I will try this later in evening. /Dag
Developers Jos Posted November 18, 2016 Developers Posted November 18, 2016 Just now, DagSa said: Do I need to make a new local printer? The normal I use isnt enought? Not sure what you are saying here ,but you need a local printer definition for the attached barcode printer to be able to print to it via LPD. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
DagSa Posted November 21, 2016 Author Posted November 21, 2016 On 2016-11-18 at 5:39 PM, Jos said: Use the LPR command to print to itfrom the remote computer: LPR IPADDRESS printer1 This give me one more hint. Printer I tested is on same computer and connected to USB. But you still need to share it to network! Even if its used localy. I also needed to change port to the USB after install. Still a litle bit confused, but it work smoth! /Dag
DagSa Posted November 28, 2016 Author Posted November 28, 2016 OK, I found something interesting. For me, better than using LPR A small exe file to print a file directly to the print spooler without setting up any special. Command: spooler.exe filename.bin "Printer name" <cr> http://www.compuphase.com/software_spool.htm /Dag spool12.zip
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now