Jump to content

Print a file (binary) to local printer que


DagSa
 Share

Recommended Posts

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)

Link to comment
Share on other sites

  • Developers

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 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.
  :)

Link to comment
Share on other sites

  • Developers
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.
  :)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...