Questions tagged [lpr]

The Line Printer Remote protocol (or LPR) is a network protocol for submitting print jobs to a remote printer.

The Line Printer Daemon protocol/Line Printer Remote protocol (or LPD, LPR) is a network protocol for submitting print jobs to a remote printer.

The original implementation of LPD was in the Berkeley printing system in the BSD UNIX operating system; the LPRng project also supports that protocol.

The Common Unix Printing System (or CUPS), which is more common on modern Linux distributions, supports LPD as well as the Internet Printing Protocol (IPP).

The LPD Protocol Specification is documented in RFC 1179.

More information is available on Wikipedia.

76 questions
1
vote
1 answer

C# - LPR Command to Print PDF Files

I am trying to run an LPR command to print a PDF. The code I'm using is being executed from a button click in a windows forms application. Code: var command = @"lpr –S 192.168.1.245 –P DAILY C:\Test.pdf"; ProcessStartInfo procStartInfo = new…
Joe G
  • 61
  • 1
  • 4
1
vote
1 answer

How can I tell how many pages will be printed from command line?

I am currently using lpr to print from the command line. I am also using a python backend. Is there anyway I can see how many pages are going to print/have printed for a specific file?
1
vote
1 answer

Print PDF from web without saving to filesystem first

In Python3.4 I am using the following code to print a PDF from a website using the requests library: with open(temp_pdf_file, 'wb') as handle: response = requests.get(html.unescape(message['body']), stream=True) for block in…
Hoffmania
  • 45
  • 4
1
vote
0 answers

Print from remote server using CUPS and Lpr

lets start step by step. Devices: REMOTESERVER = ubuntu server 12.04 (ip 95.211.132.49); LOCALSERVER = ubuntu server 12.04 (public ip 195.91.166.141); PRINTER_1 = TSC TTP-343C; PRINTER_2 = HP LaserJet Pro M201dw; Description: LOCALSERVER (private…
chelbeh
  • 11
  • 5
1
vote
0 answers

How do I set print options for lpr command within a Python script?

When I run lpr .jpg the file prints out boderless (this is what I want). When I run subprocess.call("/usr/bin/lpr " + tmp.name, shell=True) from a Python program, it prints out with borders. I also tried to call it with "lpr -o…
Brian McCarthy
  • 757
  • 1
  • 6
  • 11
1
vote
1 answer

Printing a calendar via Python. Code is not working =/

I am making a small program in Python (PyGTK) that prints out a calendar (Gregorian) for a year the user inputs. Here is my code: #!/usr/bin/env python import pygtk, gtk, subprocess pygtk.require("2.0") class Base: def printing(self, widget): …
1
vote
1 answer

LPQ on Windows 8 doesn't find my printer

I have enabled the LPD and LPR on a Windows 8. I want to print some files using the LPR command, but i can't even find the printer with the LPQ. I can print normally with the printer through (ctrl + p), but i can't find it with the LPQ…
Pedro Casado
  • 1,705
  • 1
  • 21
  • 43
1
vote
1 answer

Unable to print to lpr through bash

I have a bash file called 1.sh follows : #!/bin/bash lpr "this doc.pdf" The properties are set to "allow executing file as a program". when i open the terminal and type lpr ./1.sh it prints on the printer to paper. when I double click on the…
Kes
  • 285
  • 2
  • 17
1
vote
0 answers

It is possible to print a PDF file via LPR in Java?

I've been working in a LPR printing solution in Java. My point is if it is possible to print a PDF file with this protocol (with any combination of commands). The working mode is opening a socket with the printer (port 515) and write some commands.
manelizzard
  • 1,060
  • 8
  • 19
1
vote
3 answers

Lpr -module in Python

How can you call lpr in Python? It is not in the sys -module which is surprising. I aim to use the lpr as follows shown by pseudo-code 10*i for i in range(77): lpr --pages(i,i+1) file.pdf
anon
1
vote
1 answer

Concatenate string literals with DirectoryInfo enumeration and adding quotation marks.

This seems like such an obscure question, but here it goes: Is there a way to concatenate String Literals with a DirectoryInfo enumeration (which contains a file path) while adding quotations around the file path? Further, how can I prevent…
Ben
  • 704
  • 4
  • 10
  • 25
0
votes
1 answer

How can I use the lpd/lpr to get information about a printer?

I'd like to use port 515 (lpd protocol) to query a printer about its identity, but, unlike some other protocols, lpd does not seem to return any information about the printer when a print request is made. (Judging by the packets captured with…
Aeonaut
  • 1,267
  • 3
  • 14
  • 18
0
votes
0 answers

The text from PDF file is not printing in Linux by non-root user from bash terminal

I am trying to print an ordinary PDF file with some filled table in it from the bash terminal. When I do it as root everything is okay, but when I trying to print it as non-root user I see only tables border lines and graphics printed with no text…
0
votes
0 answers

Linux: access directory with lpr

I'm trying to print my text file with 'lpr' in linux Ubuntu import os import tempfile s = 'mystring' f = tempfile.mktemp('.txt') open(f,'w').write(s) os.system("lpr -P myprinter_name f") but I get this error: lpr: Error - unable to access "f" -…
nix20536
  • 35
  • 5
0
votes
1 answer

Print job owner (lpr) in Azure AD szenario

I'm trying to match two users for a secure print scenario: a) the owner of a printjob, logged in on a windows client and performing a print job to a secure print system via LPR The windows client is connected directly to an azure AD b) to fetch the…