[Eisfair] [E64] PDF drucken?

Rolf Bensch azubi at bensch-net.de
Mo Mär 1 09:15:46 CET 2021


Hallo zusammen,

habe die Aufgabe aus der Shell heraus ein PDF auf einem Netzwerkdrucker auszugeben. Wenn ich das richtig sehe, ist das wohl ein GDI-Drucker (Canon Maxify MB5100). Habe ich da irgendwie eine Chance? Ich habe irgendwie die (naive) Vorstellung, dass das mit LPRng funktionieren könnte:

cat /etc/printcap
   ...
   repr1:
         :done_jobs=0
         :mc=0
         :connect_grace=1
         :connect_retry=100
         :connect_interval=100
         :max_connect_interval=200
         :send_try=0
         :send_failure_action=retry
         :rw@
         :sh
         :lp=192.168.0.51%9100
         :sd=/var/spool/lpd/repr1
         :fx=flp
         :filter_options=$P $b $e $j $t $f $n $h $S
         :filter=/var/install/bin/lprng-filter
         :cm=Farbdrucker
         :smbinfo=yes


lpr -D 1 test.pdf

liefert im Logfile:
   2021-03-01-09:01:47 repr1 root at eis64-2.bensch-net.info 2802 KByte

Der Drucker zuckt aber nicht. Im Debug-Output (s.u.) finde ich keinen Hinweis auf einen Fehler. Unter Windows kann ich an die [IP]:9100 erfolgreich raw-Daten schicken. Habe daraufhin versucht den Drucker unter Samba freizugeben:

SAMBA_PRINTER_N                      =  1
│   SAMBA_PRINTER_1_ACTIVE              =  yes
│   SAMBA_PRINTER_1_NAME                =  Drucker
│   SAMBA_PRINTER_1_TYPE                =  printcap
│   SAMBA_PRINTER_1_PDF_QUALITY         =
│   SAMBA_PRINTER_1_PDF_OWNERPASS       =  ************
│   SAMBA_PRINTER_1_PDF_USERPASS        =  ************
│   SAMBA_PRINTER_1_PDF_PERMS           =
│   SAMBA_PRINTER_1_PDF_MESSAGES        =  no
│   SAMBA_PRINTER_1_CAPNAME             =  repr1
│   SAMBA_PRINTER_1_COMMENT             =  Farbdrucker
│   SAMBA_PRINTER_1_CLIENTDRIVER        =  yes
│   SAMBA_PRINTER_1_BROWSE              =  yes
│   SAMBA_PRINTER_1_USER                =
│   SAMBA_PRINTER_1_PUBLIC              =  yes

Damit wird der Drucker unter Win10 sichtbar, beim Versuch darüber zu drucken gibt's eine Fehlermeldung "Der Drucker antwortet nicht"

Samba ist nicht wirklich das Ziel. Eine direkte Ausgabe aus der Shell heraus wäre mir deutlich lieber. Laut Netz sollte das mit lpr funktionieren.

Was fehlt mir hier zu meinem Glück?

Grüße Rolf


Output:
# lpr -D 1 test.pdf
2021-03-01-09:01:46 [6314]  Initialize: /dev/null fd 3
2021-03-01-09:01:46 [6314]  initsetproctitle: doing setup
2021-03-01-09:01:46 [6314]  initsetproctitle: Argv 0x7ffc5d3da9f8, LastArgv 0x7ffc5d3dbfea
2021-03-01-09:01:46 [6314] lpr  Setup_uid: OriginalEUID 0, OriginalRUID 0
2021-03-01-09:01:46 [6314] lpr  Setup_uid: OriginalEGID 0, OriginalRGID 0
2021-03-01-09:01:46 [6314] lpr  Setup_uid: Original RUID/EUID 0/0, RUID/EUID 0/0
2021-03-01-09:01:46.375 [6314] lpr  Setup_configuration: starting, Allow_getenv 0
2021-03-01-09:01:46.375 [6314] lpr  Setup_configuration: Configuration file '/etc/lpd.conf'
2021-03-01-09:01:46.376 [6314] lpr  Setup_configuration: Require_configfiles_DYN '1'
2021-03-01-09:01:46.376 [6314] lpr  Get_config: required '1', '/etc/lpd.conf'
2021-03-01-09:01:46.376 eis64-2 [6314] lpr  Get_local_host: ShortHost_FQDN=eis64-2, FQDNHost_FQDN=eis64-2.bensch-net.info
2021-03-01-09:01:46.377 eis64-2 [6314] lpr  Is_server 0, DaemonUID 7, DaemonGID 7, UID 0, EUID 0, GID 0, EGID 0
2021-03-01-09:01:46.377 eis64-2 [6314] lpr  Setup_configuration: Host 'eis64-2.bensch-net.info', ShortHost 'eis64-2', user 'root'
2021-03-01-09:01:46.377 eis64-2 [6314] lpr  Build_printcap_info: list->count 0, raw->count 18
2021-03-01-09:01:46.377 eis64-2 [6314] lpr  Build_printcap_info: list->count 1, raw->count 0
2021-03-01-09:01:46.377 eis64-2 [6314] lpr  Get_parms: LP_mode 0
2021-03-01-09:01:46.377 eis64-2 [6314] lpr  Get_parms: option D
2021-03-01-09:01:46.377 eis64-2 [6314] lpr  Get_printer: original printer '<NULL>'
2021-03-01-09:01:46.378 eis64-2 [6314] lpr  Get_all_printcap_entries: starting
2021-03-01-09:01:46.378 eis64-2 [6314] lpr  Select_pc_info: looking for 'all', depth 0
2021-03-01-09:01:46.378 eis64-2 [6314] lpr  Select_pc_info: wildcard trying 'repr1'
2021-03-01-09:01:46.378 eis64-2 [6314] lpr  Select_pc_info: returning '<NULL>'
2021-03-01-09:01:46.378 eis64-2 [6314] lpr  Dump_line_list: Get_all_printcap_entries- All_line_list - 0x67ae50, count 1, max 102, list 0x6a5930
2021-03-01-09:01:46.378 eis64-2 [6314] lpr    [ 0] 0x6a6810 ='repr1'
2021-03-01-09:01:46.378 eis64-2 [6314] lpr  repr1: Get_printer: final printer 'repr1'
2021-03-01-09:01:46.378 eis64-2 [6314] lpr  repr1: Fix_Rm_Rp_info: printer name 'repr1'
2021-03-01-09:01:46.379 eis64-2 [6314] lpr  Reset_config: starting
2021-03-01-09:01:46.379 eis64-2 [6314] lpr  repr1: Select_pc_info: looking for 'repr1', depth 0
2021-03-01-09:01:46.379 eis64-2 [6314] lpr  repr1: Find_pc_info: found name 'repr1'
2021-03-01-09:01:46.379 eis64-2 [6314] lpr  repr1: Select_pc_info: returning 'repr1'
2021-03-01-09:01:46.379 eis64-2 [6314] lpr  repr1: Fix_Rm_Rp_info: VAR ppd= '<NULL>'
2021-03-01-09:01:46.379 eis64-2 [6314] lpr  repr1: Fix_Rm_Rp_info: Printer 'repr1', Queue 'repr1', Lp '<NULL>', Rp 'repr1', Rh 'localhost'
2021-03-01-09:01:46.379 eis64-2 [6314] lpr  repr1: lpr: Lpr_opts_DYN '<NULL>', argc 4
2021-03-01-09:01:46.379 eis64-2 [6314] lpr  repr1: Make_job: before checking format ''
2021-03-01-09:01:46.379 eis64-2 [6314] lpr  repr1: Make_job: after checking format 'f'
2021-03-01-09:01:46.379 eis64-2 [6314] lpr  repr1: Make_job: 'qq' flag 0, queue 'repr1', force_queuename '<NULL>'
2021-03-01-09:01:46.380 eis64-2 [6314] lpr  repr1: lpr: send_to_pr '<NULL>'
2021-03-01-09:01:46.380 eis64-2 [6314] lpr  repr1: *** Job lpr - before Fix_control *** - 0x7ffc5d3da6a0
2021-03-01-09:01:46.380 eis64-2 [6314] lpr  repr1:  info - 0x7ffc5d3da8a0, count 9, max 102, list 0x6a7780
2021-03-01-09:01:46.380 eis64-2 [6314] lpr  repr1:   [ 0] 0x6a69e0 ='C=A'
2021-03-01-09:01:46.380 eis64-2 [6314] lpr  repr1:   [ 1] 0x6a6d80 ='copies=0x1'
2021-03-01-09:01:46.380 eis64-2 [6314] lpr  repr1:   [ 2] 0x6803b0 ='file_hostname=eis64-2.bensch-net.info'
2021-03-01-09:01:46.380 eis64-2 [6314] lpr  repr1:   [ 3] 0x6a6640 ='format=f'
2021-03-01-09:01:46.380 eis64-2 [6314] lpr  repr1:   [ 4] 0x6a84e0 ='H=eis64-2.bensch-net.info'
2021-03-01-09:01:46.380 eis64-2 [6314] lpr  repr1:   [ 5] 0x6a5c70 ='J=test.pdf'
2021-03-01-09:01:46.380 eis64-2 [6314] lpr  repr1:   [ 6] 0x6a6910 ='number=314'
2021-03-01-09:01:46.380 eis64-2 [6314] lpr  repr1:   [ 7] 0x6a6660 ='P=root'
2021-03-01-09:01:46.381 eis64-2 [6314] lpr  repr1:   [ 8] 0x6a6520 ='priority=A'
2021-03-01-09:01:46.381 eis64-2 [6314] lpr  repr1:   datafiles - count 1
2021-03-01-09:01:46.381 eis64-2 [6314] lpr  repr1:    datafile[0] - 0x6a64a0, count 6, max 102, list 0x6a7ac0
2021-03-01-09:01:46.381 eis64-2 [6314] lpr  repr1:   [ 0] 0x6a6400 ='copies=0x1'
2021-03-01-09:01:46.381 eis64-2 [6314] lpr  repr1:   [ 1] 0x6a8860 ='dftransfername=test.pdf'
2021-03-01-09:01:46.381 eis64-2 [6314] lpr  repr1:   [ 2] 0x6a88c0 ='format=f'
2021-03-01-09:01:46.381 eis64-2 [6314] lpr  repr1:   [ 3] 0x6a8880 ='N=test.pdf'
2021-03-01-09:01:46.381 eis64-2 [6314] lpr  repr1:   [ 4] 0x6a8840 ='openname=test.pdf'
2021-03-01-09:01:46.381 eis64-2 [6314] lpr  repr1:   [ 5] 0x6a88a0 ='size=2870153'
2021-03-01-09:01:46.381 eis64-2 [6314] lpr  repr1:  destination - 0x7ffc5d3da8c0, count 0, max 0, list 0x0
2021-03-01-09:01:46.381 eis64-2 [6314] lpr  repr1: *** end ***
2021-03-01-09:01:46.381 eis64-2 [6314] lpr  repr1: *** Job lpr - after Fix_control *** - 0x7ffc5d3da6a0
2021-03-01-09:01:46.382 eis64-2 [6314] lpr  repr1:  info - 0x7ffc5d3da8a0, count 13, max 102, list 0x6a7780
2021-03-01-09:01:46.382 eis64-2 [6314] lpr  repr1:   [ 0] 0x6a8cc0 ='A=root at eis64-2+314'
2021-03-01-09:01:46.382 eis64-2 [6314] lpr  repr1:   [ 1] 0x6a69e0 ='C=A'
2021-03-01-09:01:46.382 eis64-2 [6314] lpr  repr1:   [ 2] 0x6a9400 ='cf_out_image=Heis64-2.bensch-net.info
Proot
Jtest.pdf
CA
Aroot at eis64-2+314
D2021-03-01-09:01:46.381
Qrepr1
Ntest.pdf
fdfA314eis64-2.bensch-net.info
UdfA314eis64-2.bensch-net.info
'
2021-03-01-09:01:46.383 eis64-2 [6314] lpr  repr1:   [ 3] 0x6a6850 ='cftransfername=cfA314eis64-2.bensch-net.info'
2021-03-01-09:01:46.383 eis64-2 [6314] lpr  repr1:   [ 4] 0x6a6d80 ='copies=0x1'
2021-03-01-09:01:46.383 eis64-2 [6314] lpr  repr1:   [ 5] 0x6a8df0 ='datafile_count=1'
2021-03-01-09:01:46.383 eis64-2 [6314] lpr  repr1:   [ 6] 0x6803b0 ='file_hostname=eis64-2.bensch-net.info'
2021-03-01-09:01:46.383 eis64-2 [6314] lpr  repr1:   [ 7] 0x6a6640 ='format=f'
2021-03-01-09:01:46.383 eis64-2 [6314] lpr  repr1:   [ 8] 0x6a84e0 ='H=eis64-2.bensch-net.info'
2021-03-01-09:01:46.383 eis64-2 [6314] lpr  repr1:   [ 9] 0x6a5c70 ='J=test.pdf'
2021-03-01-09:01:46.383 eis64-2 [6314] lpr  repr1:   [10] 0x6a8ca0 ='number=314'
2021-03-01-09:01:46.383 eis64-2 [6314] lpr  repr1:   [11] 0x6a6660 ='P=root'
2021-03-01-09:01:46.384 eis64-2 [6314] lpr  repr1:   [12] 0x6a6520 ='priority=A'
2021-03-01-09:01:46.384 eis64-2 [6314] lpr  repr1:   datafiles - count 1
2021-03-01-09:01:46.384 eis64-2 [6314] lpr  repr1:    datafile[0] - 0x6a64a0, count 6, max 102, list 0x6a7ac0
2021-03-01-09:01:46.384 eis64-2 [6314] lpr  repr1:   [ 0] 0x6a6400 ='copies=0x1'
2021-03-01-09:01:46.384 eis64-2 [6314] lpr  repr1:   [ 1] 0x6a91f0 ='dftransfername=dfA314eis64-2.bensch-net.info'
2021-03-01-09:01:46.384 eis64-2 [6314] lpr  repr1:   [ 2] 0x6a88c0 ='format=f'
2021-03-01-09:01:46.384 eis64-2 [6314] lpr  repr1:   [ 3] 0x6a8880 ='N=test.pdf'
2021-03-01-09:01:46.384 eis64-2 [6314] lpr  repr1:   [ 4] 0x6a8840 ='openname=test.pdf'
2021-03-01-09:01:46.384 eis64-2 [6314] lpr  repr1:   [ 5] 0x6a88a0 ='size=2870153'
2021-03-01-09:01:46.384 eis64-2 [6314] lpr  repr1:  destination - 0x7ffc5d3da8c0, count 0, max 0, list 0x0
2021-03-01-09:01:46.384 eis64-2 [6314] lpr  repr1: *** end ***
2021-03-01-09:01:46.384 eis64-2 [6314] lpr  repr1: *** Job Send_job- starting *** - 0x7ffc5d3da6a0
2021-03-01-09:01:46.385 eis64-2 [6314] lpr  repr1:  info - 0x7ffc5d3da8a0, count 13, max 102, list 0x6a7780
2021-03-01-09:01:46.385 eis64-2 [6314] lpr  repr1:   [ 0] 0x6a8cc0 ='A=root at eis64-2+314'
2021-03-01-09:01:46.385 eis64-2 [6314] lpr  repr1:   [ 1] 0x6a69e0 ='C=A'
2021-03-01-09:01:46.385 eis64-2 [6314] lpr  repr1:   [ 2] 0x6a9400 ='cf_out_image=Heis64-2.bensch-net.info
Proot
Jtest.pdf
CA
Aroot at eis64-2+314
D2021-03-01-09:01:46.381
Qrepr1
Ntest.pdf
fdfA314eis64-2.bensch-net.info
UdfA314eis64-2.bensch-net.info
'
2021-03-01-09:01:46.386 eis64-2 [6314] lpr  repr1:   [ 3] 0x6a6850 ='cftransfername=cfA314eis64-2.bensch-net.info'
2021-03-01-09:01:46.386 eis64-2 [6314] lpr  repr1:   [ 4] 0x6a6d80 ='copies=0x1'
2021-03-01-09:01:46.386 eis64-2 [6314] lpr  repr1:   [ 5] 0x6a8df0 ='datafile_count=1'
2021-03-01-09:01:46.386 eis64-2 [6314] lpr  repr1:   [ 6] 0x6803b0 ='file_hostname=eis64-2.bensch-net.info'
2021-03-01-09:01:46.386 eis64-2 [6314] lpr  repr1:   [ 7] 0x6a6640 ='format=f'
2021-03-01-09:01:46.386 eis64-2 [6314] lpr  repr1:   [ 8] 0x6a84e0 ='H=eis64-2.bensch-net.info'
2021-03-01-09:01:46.386 eis64-2 [6314] lpr  repr1:   [ 9] 0x6a5c70 ='J=test.pdf'
2021-03-01-09:01:46.386 eis64-2 [6314] lpr  repr1:   [10] 0x6a8ca0 ='number=314'
2021-03-01-09:01:46.386 eis64-2 [6314] lpr  repr1:   [11] 0x6a6660 ='P=root'
2021-03-01-09:01:46.386 eis64-2 [6314] lpr  repr1:   [12] 0x6a6520 ='priority=A'
2021-03-01-09:01:46.386 eis64-2 [6314] lpr  repr1:   datafiles - count 1
2021-03-01-09:01:46.387 eis64-2 [6314] lpr  repr1:    datafile[0] - 0x6a64a0, count 6, max 102, list 0x6a7ac0
2021-03-01-09:01:46.387 eis64-2 [6314] lpr  repr1:   [ 0] 0x6a6400 ='copies=0x1'
2021-03-01-09:01:46.387 eis64-2 [6314] lpr  repr1:   [ 1] 0x6a91f0 ='dftransfername=dfA314eis64-2.bensch-net.info'
2021-03-01-09:01:46.387 eis64-2 [6314] lpr  repr1:   [ 2] 0x6a88c0 ='format=f'
2021-03-01-09:01:46.387 eis64-2 [6314] lpr  repr1:   [ 3] 0x6a8880 ='N=test.pdf'
2021-03-01-09:01:46.387 eis64-2 [6314] lpr  repr1:   [ 4] 0x6a8840 ='openname=test.pdf'
2021-03-01-09:01:46.387 eis64-2 [6314] lpr  repr1:   [ 5] 0x6a88a0 ='size=2870153'
2021-03-01-09:01:46.387 eis64-2 [6314] lpr  repr1:  destination - 0x7ffc5d3da8c0, count 0, max 0, list 0x0
2021-03-01-09:01:46.387 eis64-2 [6314] lpr  repr1: *** end ***
2021-03-01-09:01:46.387 eis64-2 [6314] lpr  repr1: Fix_send_auth: name '<NULL>'
2021-03-01-09:01:46.387 eis64-2 [6314] lpr  repr1: Fix_send_auth: no security
2021-03-01-09:01:46.387 eis64-2 [6314] lpr  repr1: setstatus: msg 'sending job 'root at eis64-2+314' to repr1 at localhost'
2021-03-01-09:01:46.387 eis64-2 [6314] lpr  repr1: setstatus: msg 'connecting to 'localhost', attempt 1'
2021-03-01-09:01:46.387 eis64-2 [6314] lpr  repr1: setstatus: msg 'connected to 'localhost''
2021-03-01-09:01:46.387 eis64-2 [6314] lpr  repr1: setstatus: msg 'requesting printer repr1 at localhost'
2021-03-01-09:01:46.388 eis64-2 [6314] lpr  repr1: setstatus: msg 'sending control file 'cfA314eis64-2.bensch-net.info' to repr1 at localhost'
2021-03-01-09:01:46.388 eis64-2 [6314] lpr  repr1: setstatus: msg 'completed sending 'cfA314eis64-2.bensch-net.info' to repr1 at localhost'
2021-03-01-09:01:46.388 eis64-2 [6314] lpr  repr1: setstatus: msg 'sending data file 'dfA314eis64-2.bensch-net.info' to repr1 at localhost'
2021-03-01-09:01:46.391 eis64-2 [6314] lpr  repr1: setstatus: msg 'completed sending 'dfA314eis64-2.bensch-net.info' to repr1 at localhost'
2021-03-01-09:01:46.391 eis64-2 [6314] lpr  repr1: setstatus: msg 'done job 'root at eis64-2+314' transfer to repr1 at localhost'
2021-03-01-09:01:46.391 eis64-2 [6314] lpr  repr1: cleanup: done, exit(0)



Mehr Informationen über die Mailingliste Eisfair