How can I copy a print file to a networked printer?

999

Solution 1

Use Microsoft's lpr client

C:\>lpr /?

Sends a print job to a network printer

Usage: lpr -S server -P printer [-C class] [-J job] [-o option] [-x] [-d] filename

Options:
     -S server    Name or ipaddress of the host providing lpd service
     -P printer   Name of the print queue
     -C class     Job classification for use on the burst page
     -J job       Job name to print on the burst page
     -o option    Indicates type of the file (by default assumes a text file)
                  Use "-o l" for binary (e.g. postscript) files
     -x           Compatibility with SunOS 4.1.x and prior
     -d           Send data file first

This works with JetDirect and similar boxes/adapters as well as Unix/Linux and Windows servers that have the LPD service enabled.

Solution 2

From the command prompt:

copy filename \\Server Name\\{Printer Share Name}

If there is a space with the print share name be sure to enclose in quotes. For example:

copy filename "\\{Server Name}\\{Printer Share Name}"

Solution 3

lpr works great on Win 7 and up. You do not need to copy it. In Control Panel, go to "turn windows features on or off" and make sure "print and document services" are installed.

To use lpr to send a file to printer that uses the RAW protocol, the syntax is:

lpr -S <printer name or IP> -P raw <file to send>

e.g.
lpr -S 192.168.11.118 -P raw postscript.ps

enter image description here

Solution 4

Try sharing the local printer connection and then connect it to LPT1

NET USE LPT1: \\localhost\printer
Share:
999

Related videos on Youtube

Muhnad
Author by

Muhnad

Updated on September 18, 2022

Comments

  • Muhnad
    Muhnad almost 2 years

    Angular changes the view so that the page title changes, but screen readers can't read it, so I tried to use live regions, but that doesn't work.

    <title ng-bind="title" aria-live="assertive" aria-atomic="true">Title here</title>

    I want to know the reason why live regions not working in this case? I don't need any solution to make user know the page is changed and content also

    • FelipeAls
      FelipeAls over 7 years
      Just in case, does it work with aria-live="polite"?
    • FelipeAls
      FelipeAls over 7 years
      Relevant definition: live region (is title a "perceivable region of a web page that (is) typically updated" when it's only updated when "page" changes in good ol' web "sites"?). Other roles you could try: special cases live regions (I don't know what is their support in page content - element in body-, not to say as a title element)
    • Muhnad
      Muhnad over 7 years
      @FelipeAls unfortunately not.
  • Ola Eldøy
    Ola Eldøy about 12 years
    Thanks, I tried it. The net use command was successful. However, trying to copy it afterwards failed. ('copy file to lpt1' gave 'access is denied', and 'copy file to lpt1:' gave '"lpt1:" is not a recognized device. The system cannot find the file specified.')
  • Ola Eldøy
    Ola Eldøy about 12 years
    lpr did the trick! Mind you, I had to do do gymnastics to get it to work on a 64-bit Windows installation. superuser.com/a/420410/2565
  • Syed Zargham Haider
    Syed Zargham Haider over 8 years
    If you use /persistent:yes it will keep the connection after a reboot NET USE LPT1: \\localhost\printer /persistent:yes
  • DavidPostill
    DavidPostill almost 8 years
    Welcome to Super User! Please read the question again carefully. Your answer does not answer the original question.
  • parascus
    parascus almost 8 years
    in my experience, the above works great on win XP and win 7, but not on Win 10
  • Muhnad
    Muhnad over 7 years
    I tested it before I ask on Chrome & Firefox with NVDA and ChromeVox and doesn't appear any support. so that I asked the question to know the reason I know the live regions only work when page content updated and in this case the title updates and the live regions not work.
  • aardrian
    aardrian over 7 years
    ChromeVox is not a very good screen reader. Its use is mostly for testing. JAWS has some support, but it is spotty. But the reason it does not work well is because it is not intended to work.
  • Superdooperhero
    Superdooperhero over 5 years
    How would you specify the port of that ip address?
  • parascus
    parascus over 5 years
    @Superdooperhero The -P option lets you specify the printer/port. See docs.microsoft.com/en-us/windows-server/administration/…
  • Chenmunka
    Chenmunka over 2 years
    That answer has already been given.