apple / cups

Apple CUPS Sources
https://www.cups.org
Apache License 2.0
1.95k stars 464 forks source link

How to save files in the CUPS server #5431

Closed wendraw closed 6 years ago

wendraw commented 6 years ago

I‘m installed CUPS2.2.1 in the Raspberry Pi. And now I want save the file sent from the client(Windows、macOS or iOS). What should I do?

michaelrsweet commented 6 years ago

There are a number of third-party CUPS backends that basically save print jobs to a directory, email them, etc. A quick google of "CUPS save backends" should get you going.

Alternately you can look in the /var/spool/cups directory for the "d" files - those will be the submitted print files. They are normally kept for 24 hours before deletion.

wendraw commented 6 years ago

There are a number of third-party CUPS backends that basically save print jobs to a directory, email them, etc. A quick google of "CUPS save backends" should get you going.

Alternately you can look in the /var/spool/cups directory for the "d" files - those will be the submitted print files. They are normally kept for 24 hours before deletion.

I just can find "c0005" and "tmp/cups-dbus-notifier-lockfile" files in the /var/spool/cups. But I don't know the role of these files. Now I want to create a script to save the file send from the client and then print it using the "lp filename" command , Because the DNP printer is not working properly.

jsmeix commented 6 years ago

@wendraw I think https://en.opensuse.org/SDB:Using_Your_Own_Backends_to_Print_with_CUPS could help you.

Regarding 'd...' versus 'c...' files in CUPS' spool directory and other general things about CUPS you may also have a look at https://en.opensuse.org/SDB:CUPS_in_a_Nutshell

Regarding printing from Windows clients you may have a look at https://en.opensuse.org/SDB:Printing_from_Windows_to_Linux

Regarding printing from iOS or OS X clients you may look for documentation about setting up AirPrint for CUPS and the generic limitations with that approach and special software for that like what there is at openSUSE https://build.opensuse.org/package/show/Printing/cups-airprint therein in particular https://build.opensuse.org/package/view_file/Printing/cups-airprint/README.SUSE?expand=1

Some details might be different depending on what operating system you run on your Raspberry Pi but in general CUPS behaves same.

debiantriage commented 6 years ago

I just can find "c0005" and "tmp/cups-dbus-notifier-lockfile" files in the /var/spool/cups. But I don't know the role of these files. Now I want to create a script to save the file send from the client and then print it using the "lp filename" command , Because the DNP printer is not working properly.

Tea4CUPS will do this.

-- Brian.

wendraw commented 5 years ago

@wendraw I think https://en.opensuse.org/SDB:Using_Your_Own_Backends_to_Print_with_CUPS could help you.

Regarding 'd...' versus 'c...' files in CUPS' spool directory and other general things about CUPS you may also have a look at https://en.opensuse.org/SDB:CUPS_in_a_Nutshell

Regarding printing from Windows clients you may have a look at https://en.opensuse.org/SDB:Printing_from_Windows_to_Linux

Regarding printing from iOS or OS X clients you may look for documentation about setting up AirPrint for CUPS and the generic limitations with that approach and special software for that like what there is at openSUSE https://build.opensuse.org/package/show/Printing/cups-airprint therein in particular https://build.opensuse.org/package/view_file/Printing/cups-airprint/README.SUSE?expand=1

Some details might be different depending on what operating system you run on your Raspberry Pi but in general CUPS behaves same.

These information helpful to me. Thanks

wendraw commented 5 years ago

I just can find "c0005" and "tmp/cups-dbus-notifier-lockfile" files in the /var/spool/cups. But I don't know the role of these files. Now I want to create a script to save the file send from the client and then print it using the "lp filename" command , Because the DNP printer is not working properly.

Tea4CUPS will do this.

-- Brian.

Tea4CUPS is what I want, you have helped me a lot!