1Prima::PS::Printer(3) User Contributed Perl DocumentationPrima::PS::Printer(3)
2
3
4

NAME

6       Prima::PS::Printer - PostScript interface to Prima::Printer
7

SYNOPSIS

9       use Prima; use Prima::PS::Printer;
10

DESCRIPTION

12       Realizes the Prima printer interface to PostScript level 2 document
13       language through Prima::PS::PostScript module and PDF v1.4 through the
14       Prima::PS::PDF module. Allows different user profiles to be created and
15       managed with GUI setup dialog. The module is designed to be compliant
16       with Prima::Printer interface.
17
18       Also contains convenience classes (File, LPR, Pipe) for non-GUI use.
19

SYNOPSIS

21               use Prima::PS::Printer;
22
23               my $x;
24               if ( $preview) {
25                       $x = Prima::PS::Pipe-> new( command => 'gv $');
26               } elsif ( $print_in_file) {
27                       $x = Prima::PS::File-> new( file => 'out.ps');
28               } elsif ( $print_on_device) {
29                       $x = Prima::PS::LPR-> new( args => '-d colorprinter');
30               } elsif ( $print_pdf_file ) {
31                       $x = Prima::PS::PDF::File-> new( file => 'out.pdf');
32               } else {
33                       $x = Prima::PS::FileHandle-> new( handle => \*STDOUT );
34               }
35               $x-> begin_doc;
36               $x-> font-> size( 300);
37               $x-> text_out( "hello!", 100, 100);
38               $x-> end_doc;
39

Printer options

41       Below is the list of options supported by "options" method:
42
43       Color STRING
44           One of : "Color, Monochrome"
45
46       Resolution INTEGER
47           Dots per inch.
48
49       PageSize STRING
50           One of: "Ainteger, Binteger, Executive, Folio, Ledger, Legal,
51           Letter, Tabloid, US Common #10 Envelope".
52
53       Copies INTEGER
54           (not applicable to PDF)
55
56       Scaling FLOAT
57           1 is 100%, 1.5 is 150%, etc.
58
59       Orientation
60           One of : "Portrait", "Landscape".
61
62       MediaType STRING
63           An arbitrary string representing special attributes of the medium
64           other than its size, color, and weight. This parameter can be used
65           to identify special media such as envelopes, letterheads, or
66           preprinted forms.
67
68           (not applicable to PDF)
69
70       MediaColor STRING
71           A string identifying the color of the medium.
72
73           (not applicable to PDF)
74
75       MediaWeight FLOAT
76           The weight of the medium in grams per square meter. "Basis weight"
77           or or null "ream weight" in pounds can be converted to grams per
78           square meter by multiplying by 3.76; for example, 10-pound paper is
79           approximately 37.6 grams per square meter.
80
81           (not applicable to PDF)
82
83       MediaClass STRING
84           (Level 3) An arbitrary string representing attributes of the medium
85           that may require special action by the output device, such as the
86           selection of a color rendering dictionary. Devices should use the
87           value of this parameter to trigger such media-related actions,
88           reserving the MediaType parameter (above) for generic attributes
89           requiring no device-specific action.  The MediaClass entry in the
90           output device dictionary defines the allowable values for this
91           parameter on a given device; attempting to set it to an unsupported
92           value will cause a configuration error.
93
94           (not applicable to PDF)
95
96       InsertSheet BOOLEAN
97           (Level 3) A flag specifying whether to insert a sheet of some
98           special medium directly into the output document. Media coming from
99           a source for which this attribute is Yes are sent directly to the
100           output bin without passing through the device's usual imaging
101           mechanism (such as the fuser assembly on a laser printer).
102           Consequently, nothing painted on the current page is actually
103           imaged on the inserted medium.
104
105           (not applicable to PDF)
106
107       LeadingEdge BOOLEAN
108           (Level 3) A value specifying the edge of the input medium that will
109           enter the printing engine or imager first and across which data
110           will be imaged.  Values reflect positions relative to a canonical
111           page in portrait orientation (width smaller than height). When
112           duplex printing is enabled, the canonical page orientation refers
113           only to the front (recto) side of the medium.
114
115           (not applicable to PDF)
116
117       ManualFeed BOOLEAN
118           Flag indicating whether the input medium is to be fed manually by a
119           human operator (Yes) or automatically (No). A Yes value asserts
120           that the human operator will manually feed media conforming to the
121           specified attributes ( MediaColor, MediaWeight, MediaType,
122           MediaClass, and InsertSheet). Thus, those attributes are not used
123           to select from available media sources in the normal way, although
124           their values may be presented to the human operator as an aid in
125           selecting the correct medium. On devices that offer more than one
126           manual feeding mechanism, the attributes may select among them.
127
128           (not applicable to PDF)
129
130       TraySwitch BOOLEAN
131           (Level 3)  A flag specifying whether the output device supports
132           automatic switching of media sources. When the originally selected
133           source runs out of medium, some devices with multiple media sources
134           can switch automatically, without human intervention, to an
135           alternate source with the same attributes (such as PageSize and
136           MediaColor) as the original.
137
138           (not applicable to PDF)
139
140       MediaPosition STRING
141           (Level 3) The position number of the media source to be used.  This
142           parameter does not override the normal media selection process
143           described in the text, but if specified it will be honored -
144           provided it can satisfy the input media request in a manner
145           consistent with normal media selection - even if the media source
146           it specifies is not the best available match for the requested
147           attributes.
148
149           (not applicable to PDF)
150
151       DeferredMediaSelection BOOLEAN
152           (Level 3) A flag determining when to perform media selection.  If
153           Yes, media will be selected by an independent printing subsystem
154           associated with the output device itself.
155
156           (not applicable to PDF)
157
158       MatchAll BOOLEAN
159           A flag specifying whether input media request should match to all
160           non-null values - MediaColor, MediaWeight etc.
161
162           (not applicable to PDF)
163

AUTHOR

165       Dmitry Karasik, <dmitry@karasik.eu.org>.
166

SEE ALSO

168       Prima, Prima::Printer, Prima::Drawable, Prima::PS::PDF
169
170
171
172perl v5.34.0                      2021-07-22             Prima::PS::Printer(3)
Impressum