AW: [cups.general] PDF creation with CUPS and without Samba for Win2k-clients

Marcus Mundt Marcus.Mundt at forsa.de
Fri Jul 30 06:27:45 PDT 2004


Thanks for the prompt reply.

My cups-server runs and I`m also able to "print" PDFs.

Now the last thing to do is to get these files moved to the novell server
after they have been created. Is there an other way to get the files
somewhere without editing the backend? I could edit it but I don`t know
exactly what to put in there. You gave me a hint with your example and I`ll
try hard. But it doesn`t seem to be easy. I`m not a good programmer. I think
the language is C. I never learned it.

If there is something else I can do, please let me know.

cheers,
Marcus


-----Ursprungliche Nachricht-----
Von: cups-bounces at easysw.com [mailto:cups-bounces at easysw.com]Im Auftrag
von Johannes Meixner
Gesendet: Freitag, 30. Juli 2004 12:01
An: cups at easysw.com
Betreff: Re: [cups.general] PDF creation with CUPS and without Samba for
Win2k-clients



Hello,

On Jul 30 09:23 Marcus Mundt wrote (shortened):
> I`d like to setup a suse 9.1 system which runs CUPS. This server should
> convert send data to PDFs.
> Win2k-clients get an IPP-Printer (postscript) and by sending a printing
job
> the printer on the suse 9.1 server creates with an adequate filter
> PDF-files. The created files should be saved on a Novell server.

There are three steps and therefore three seperated issues:

1.
How to send data from the client system to the CUPS server system.

2.
How to filter the data to become PDF.

3.
How to send the resulting data to the Novell server.


Regarding 1.:
If the client system supports IPP use IPP.
If not use anything you like which is supported by the client system
and the CUPS server system e.g. LPD (via cups-lpd) or SMB (via Samba)
or even plain TCP sockets via inetd by having in inetd.conf
something like
  9100 stream tcp nowait lp /usr/bin/lp lp -d queuename


Regarding 2.:
Have a look at
http://portal.suse.com/sdb/en/2003/06/jsmeix_print-cups-filters.html
I think a seperated queue with a System V style interface script
is what you are looking for.


Regarding 3.:
I asssume there is no generic CUPS backend which can send data
to a Novell server as you need it - this depends on how the Novell
server accepts the data (i.e. which service is used to receive
the data on the Novell server).
If there is no suitable CUPS backend then you must make your own
backend. See the CUPS documentation.
A very simple example to get an idea how to make your own backend:
Here a backend only for /dev/lp0 with everything hardcoded
and with a dirty (race condition) test to access the device:
-------------------------------------------------------------------
#! /bin/bash
# see the "CUPS Software Programmers Manual":
# "Writing Filters" and "Writing Backends"

# debug info in /var/log/cups/error_log
set -x

# output "Device Discovery" information on stdout
if [ "$#" -eq "0" ]
then
  echo 'direct lp0:/dev/lp0 "Unknown" "lp0 Printer"'
  exit 0
fi

# have the input at fd0 (stdin) in any case
if [ -n "$6" ]
then
  exec <"$6"
fi

# infinite retries to access the device
until cat /dev/null >/dev/lp0
do
  echo 'INFO: cannot access /dev/lp0 - retry in 30 seconds' 1>&2
  sleep 30
done
echo 'INFO: sending the data to /dev/lp0' 1>&2

# forward the data from stdin to the device
if cat - >/dev/lp0
then
  echo 'INFO:' 1>&2
  exit 0
else
  echo 'ERROR: failed to send the data to /dev/lp0' 1>&2
  exit 1
fi
-------------------------------------------------------------------
Note that you can do whatever you like inside your backend
provided the user who runs the backend (normally lp) is
allowed to do it.


Regards
Johannes Meixner
--
SUSE LINUX AG, Maxfeldstrasse 5                 Mail: jsmeix at suse.de
90409 Nuernberg, Germany                    WWW: http://www.suse.de/

_______________________________________________
cups mailing list
cups at easysw.com
http://lists.easysw.com/mailman/listinfo/cups





More information about the cups mailing list