What is device type SAPWIN used for?
This note contains information about the device type SAPWIN; it is not a problem-solving note.
SolutionThe program SAPLPD has two functions. On the one hand, it can accept print data like a normal LPD and transfer this data to the host spooler. On the other hand, it can also interpret the special data stream SAPWIN/SWIN and convert it to GDI calls in MS Windows using the printer drivers provided by Windows or the printers.
'SAPWIN' is a data stream protocol, structured in a similar manner to a printer control language, as defined for existing printer families. R/3 contains the device type 'SAPWIN' (or SWIN), which is adapted to it.
'SAPWIN' is an SAP-internal format, which may change without prior notice.
SAPWIN recognizes and processes the following character strings that may be scattered through the output text: (In the subsequent text, 'Esc' always stands for '\033' (ESCAPE), for example, in the case of Unicode,
for the corresponding Unicode character). '\n' (NEWLINE) Line feed and at left margin
'\r' (RETURN) To left margin
'\f' (FORMFEED) form feed
Esc B 1 Normal type
Esc B 2 Bold type
Esc B 3 Extrabold type
Esc B 0 Light type
Esc C x y Set list color x = 0..7, y = N,H,V (as in ABAP)
Esc U 0 No underscores
Esc U 1 Underscores
Esc I 0 Italics off
Esc I 1 Italics on
Esc S s f Font size & family:
f = C Courier family (for example, Courier)
f = R Roman family (for example, Times Roman)
f = S Swiss family (for example, MS Sans Serif)
f = N Novelty family (for example, Old English)
f = H Script family (for example, Script)
f = X Do not change font family
s = Font size in TWIPS (optional)
Esc F name ; Choose font name
Also read Notes 11364 and 13350.
Esc P P|L Portrait/landscape mode
Esc p xx; Set paper size to xx (as of Release 4.02)
1 /* Letter 8 1/2 x 11 in */
2 /* Letter Small 8 1/2 x 11 in */
3 /* Tabloid 11 x 17 in */
4 /* Ledger 17 x 11 in */
5 /* Legal 8 1/2 x 14 in */
6 /* Statement 5 1/2 x 8 1/2 in */
7 /* Executive 7 1/4 x 10 1/2 in */
8 /* A3 297 x 420 mm */
9 /* A4 210 x 297 mm */
10 /* A4 Small 210 x 297 mm */
11 /* A5 148 x 210 mm */
12 /* B4 (JIS) 250 x 354 */
13 /* B5 (JIS) 182 x 257 mm */
14 /* Folio 8 1/2 x 13 in */
15 /* Quarto 215 x 275 mm */
16 /* 10x14 in */
17 /* 11x17 in */
18 /* Note 8 1/2 x 11 in */
19 /* Envelope #9 3 7/8 x 8 7/8 */
20 /* Envelope #10 4 1/8 x 9 1/2 */
21 /* Envelope #11 4 1/2 x 10 3/8 */
22 /* Envelope #12 4 \276 x 11 */
23 /* Envelope #14 5 x 11 1/2 */
24 /* C size sheet */
25 /* D size sheet */
26 /* E size sheet */
27 /* Envelope DL 110 x 220mm */
28 /* Envelope C5,162 x 229 mm */
29 /* Envelope C3 324 x 458 mm */
30 /* Envelope C4 229 x 324 mm */
31 /* Envelope C6 114 x 162 mm */
32 /* Envelope C65 114 x 229 mm */
33 /* Envelope B4 250 x 353 mm */
34 /* Envelope B5 176 x 250 mm */
35 /* Envelope B6 176 x 125 mm */
36 /* Envelope 110 x 230 mm */
37 /* Envelope Monarch 3.875 x 7.5 in */
38 /* 6 3/4 Envelope 3 5/8 x 6 1/2 in */
39 /* US Std Fanfold 14 7/8 x 11 in */
40 /* German Std Fanfold 8 1/2 x 12 in */
41 /* German Legal Fanfold 8 1/2 x 13 in */
As of NT4.0:
42 /* B4 (ISO) 250 x 353 mm */
43 /* Japanese Postcard 100 x 148 mm */
44 /* 9 x 11 in */
45 /* 10 x 11 in */
46 /* 15 x 11 in */
47 /* Envelope Invite 220 x 220 mm */
50 /* Letter Extra 9 \275 x 12 in */
51 /* Legal Extra 9 \275 x 15 in */
52 /* Tabloid Extra 11.69 x 18 in */
53 /* A4 Extra 9.27 x 12.69 in */
54 /* Letter Transverse 8 \275 x 11 in */
55 /* A4 Transverse 210 x 297 mm */
56 /* Letter Extra Transverse 9\275 x 12 in */
57 /* SuperA/SuperA/A4 227 x 356 mm */
58 /* SuperB/SuperB/A3 305 x 487 mm */
59 /* Letter Plus 8.5 x 12.69 in */
60 /* A4 Plus 210 x 330 mm */
61 /* A5 Transverse 148 x 210 mm */
62 /* B5 (JIS) Transverse 182 x 257 mm */
63 /* A3 Extra 322 x 445 mm */
64 /* A5 Extra 174 x 235 mm */
65 /* B5 (ISO) Extra 201 x 276 mm */
66 /* A2 420 x 594 mm */
67 /* A3 Transverse 297 x 420 mm */
68 /* A3 Extra Transverse 322 x 445 mm */
Esc c xx; Set CPI (xx characters per INCH;
xx.xx also possible for decimal places)
Esc l xx Set LPI (characters per INCH, xx.xx also possible)
Esc s x Super/Subscript + = Superscript
- = Subscript
0 = Normal
Esc G x Graphics character for list frame
* * *
0 = *** 1 = * 2 = ** 3 = ** 4 = ** 5 = **
* * *
* * * *
6 = ** 7 = ** 8 = *** 9 = *** : = *** ; = **
* * * *
*
< = * = = ** > = *
*
? = Field not selected (output as _)
@ = Field selected (output as X)
Esc G L sx,sy,ex,ey,thick,style,r,g,b;
Draw line from (sx,sy) to (ex,ey).
All measurements and positions are in TWIPS.
Use thickness 'thick' and style 'style'.
Style: 1 = (full line)
2 = (dashed line)
3 = (dotted line)
4 = (dashed/dotted)
5 = (dashed/2 * dotted)
r,g,b is the RGB color value for the line.
Esc G B sx,sy,ex,ey,thick,lstyle,corner,lr,lg,lb,fstyle,fr,fg,fb;
Draw a rectangle from (sx,sy) to (ex,ey).
All measurements and positions are in TWIPS.
Use thickness 'thick' and style 'lstype'.
Style as ESC G L (centered for all lines)
Also: 6 = full line outside the rectangle
0/7 = draw no frame
'corner' is the corner radius (0 = square corners)
(lr,lg,lb) is the RGB color value of the frame
'fstyle' is the fill pattern:
1 = empty
2 = horizontal lines
3 = vertical lines
4 = diagonal lines to the right
5 = diagonal lines to the left
6 = horizontal + vertical lines
7 = diagonal lines to the left and right
(fr,fg,fb) is the RGB color value for the fill pattern
Esc G b
Output the graphic described by
at the current position.
(As of Release 2.41, and only in the 32-bit version,
as of Release 2.46 also in the 16-bit version, but only up to 64KB bitmaps)
Esc G f
Output the BMP file
(FAs of 2.53/3.04 also; allowed instead of hex-00)
(As of Release 2.41, and only in the 32-bit version,
as of Release 2.46 also in the 16-bit version, but only up to 64KB bitmaps)
Esc G F
current font size.
Esc G M nn
(as of SAPLPD 4.18)
Esc G m nn use macro defined before (as of SAPLPD 4.18)
Esc b barcode Esc Print barcode using barcode DLL
(No bars are output!)
Also refer to Note 14561.
Esc o A An OCR-A character follows (do not use this any more)
Esc o B An OCR-B character follows (do not use this any more)
Esc X Go to DLL extension (may or may not work...)
Esc x yz Output character with hexcode yz
Esc M T xx; Set top margin (unit of measurement = TWIPS as of 2.32)
Esc M L xx; Set left margin (1440 TWIPS = 1 inch = 2.54 cm)
only as of SAPLPD 2.32
Esc D x Set duplex mode
(as of Version 2.44) do not set a default in the
print manager!
x = 'S' Simplex
'D' Duplex (long side)
'T' Tumble (short side)
'F' Print on front
'B' Print on back
Esc T n Select Papertray n
(As of Version 2.44)
n=1..9 (Tray number; interpretation is printer-dependent)
n=M Manual feed
n=E Envelopes
n=e Manual envelopes
Esc d nnnn Output SAPding (requires font)
Esc i nnnn Output SAPicon (requires font up to Version 2.45
as of 2.46, output possible as bitmap graphics)
Esc r
Esc R nn Output SAPicon with internal Code 00..ZZ (as of Release 4.21)
Esc t
(can be used for control codes;
functions only if the Windows driver supports
this function - most drivers do NOT support it!)
Esc m x,y; Move to (x,y) Position in TWIPS
Esc w x; Set width of space character in TWIPS
Esc O M p|l p = Use physical paper edge
l = Use logical paper edge (printable area) [default]
(commands only effective with enable_phys_margins=1 [default])
Esc O C b|t b = Use baseline for character positioning
t = Top of the character is the reference point
Esc O p 0|1 0 = Do not use proportional fonts
1 = Allowed proportional fonts
Esc O s 0|1 0 = Do not automatically determine character spacing from
the font size
1 = Character spacing derived from font size
Esc O a 0|1 0 = Issue ABAP lists individually
1 = Issue as a string (you are not allowed to use ESC c)
(may not be used if lists with proportional fonts
(Arial and so on) are to be output.)
Esc W x; Set WinCharSet to x (see WINNT.H)
Esc L hhhh; Set locale to hhhh. hhhh is hex-coded
LANG- and SUBLANG (see WINNT.H)
Esc L c; Locale on c (internal R/3 coding of the language key)
Esc L; Reset locale to previous value (SAPLPD 4.28 and higher)
Esc > m,n; Distribute output on m pages with n characters per page
(can be used for wide lists, for example)
(requires SAPLPD 4.15 or higher)
Esc < 2|4 Print 2 or 4 pages per page (SAPLPD 4.15 or higher)
Must come immediately after ESC %SAPWIN%!
(automatic scaling)
Esc f r,g,b; Define text colour RGB
Esc q m; Set page length in m*1/10 millimeters (SAPLPD 4.25 or higher)
Esc %SAPWIN% Indicates that this is a SAPWIN data stream
(Should be the first command in the initialization
and the title page)
(As of SAPLPD 6.00, SAPLPD also understands a UNICODE
data stream (UTF16-LE), if %SAPWIN% is coded in UNICODE.)
We plan to develop SAPWIN upwards only. This should make it possible to use new SAPLPDs even if the R/3 System has not been upgraded.
However, we only guarantee that the R/3 device type SAPWIN (SWIN) matches the associated SAPLPD.
No comments:
Post a Comment