1Net::CUPS(3)          User Contributed Perl Documentation         Net::CUPS(3)
2
3
4

NAME

6       Net::CUPS - Common Unix Printing System Interface
7

SYNOPSIS

9         use Net::CUPS;
10
11         my $cups = Net::CUPS->new();
12
13         my $printer = $cups->getDestination( "lj4200dn" );
14

DESCRIPTION

16       Net::CUPS is an object oriented interface to the Common Unix Printing
17       System.
18

METHODS

20       getDestination
21           my $printer = $cups->getDestination( $printer_name );
22
23           This method takes the name of the printer to acquire.  If the
24           printer does not exist it will return nothing.
25
26       getDestinations
27           my @printers = $cups->getDestinations();
28
29           This method will return an array of destinations currently
30           configured on the cups server.
31
32       getPassword
33           my $password = $cups->getPassword( $prompt );
34
35           Method to retrieve the password from the user via the password
36           callback.
37
38       getPPD
39           my $ppd = $cups->getPPD( $name );
40
41           Returns a Net::CUPS::PPD object for the default printer or for the
42           specified printer or class.
43
44       getPPDMakes
45           my $makes = $cups->getPPDMakes();
46
47           Returns an arrary of scalers holding the names of all the makers
48           (e.g. HP or Lexmark) of PPD files installed on the CUPS server
49
50       getAllPPDs
51           my $ppds = $cups->getAllPPDs();
52
53           Returns an array of scalers with the maker and model of all the
54           PPDs installed on the CUPS server
55
56       getPPDFileName
57           $cups->getPPDFileName($ppd_name_and_make);
58
59           Returns the file name of the PPD specified by the name and make as
60           found in the array returned by getAllPPDs.  The file name is used
61           by addDestination and is relative to where the CUPS server is
62           instructed to look (e.g /usr/share/ppd).
63
64       getServer
65           my $server_name = $cups->getServer();
66
67           A method to return either the hostname or the IP address of the
68           active print server.
69
70       getUsername
71           my $username = $cups->getUsername();
72
73           This method will return the current username associated with the
74           CUPS transaction.
75
76       requestData
77           my $result = $cups->requestData( $request, $resource, $filename );
78
79           Send an IPP request to the server.  This function is based off the
80           C CUPS function cupsDoRequest and cupsDoRequestFile.  The $filename
81           is optional.
82
83       setPasswordCB
84           $cups->setPasswordCB( $function )
85
86           Method to set the callback function to be used by getPassword.
87
88       setServer
89           $cups->setServer( $server_ip );
90
91           This method will change the current cups server to another hosts.
92
93       setUsername
94           $cups->setUsername( $username );
95
96           A method to change the username associated with CUPS interaction.
97
98       deleteDestination
99           $cups->deleteDestination( $destination_name );
100
101           A method to delete an existing destination
102
103       addDestination
104           $cups->addDestination( $name, $location, $printer_info, $ppd_name,
105           $device_uri) A method to create a new destination.  The $ppd_name
106           variable should be the one returned for that printer by the
107           getPPDFileName method.  It will be relative to where the CUPS
108           server is configured to look for PPD files (e.g. /usr/share/ppd).
109

SEE ALSO

111       Net::CUPS::Destination, Net::CUPS::PPD, Net::CUPS::IPP
112

SUPPORT

114       Net::CUPS is currently maintained by Stefan Seifert <NINE@cpan.org>.
115       The Github repository for this project is at
116       <https://github.com/niner/perl-Net-CUPS>. Pull requests are welcome.
117

AUTHOR

119       Dracken Technology, Inc. (http://www.dracken.com/)
120

ACKNOWLEDGEMENTS

122       Aike Reyer <aike@users.sourceforge.net> supplied the password handling
123       code.
124
125       Mark Gannon <mark@truenorth.nu> supplied the code for PPD acquisition,
126       destination creation and destination deletion.
127
129       Copyright (c) 2003-2005 David Hageman
130
131       Copyright (c) 2006-2009 Dracken Technology, Inc.
132
133       All rights reserved.
134
135       This library is free software; you can redistribute it and/or modify it
136       under the same terms as Perl itself, either Perl version 5.8.8 or, at
137       your option, any later version of Perl 5 you may have available.
138
139       CUPS, the Common UNIX Printing System, the CUPS logo, and ESP Print Pro
140       are the trademark property of Easy Software Products.
141
142
143
144perl v5.36.0                      2023-02-15                      Net::CUPS(3)
Impressum