An external barcode DLL is to be added to the SAPSprint or SAPFprint.
The SAPSprint or SAPFprint delegates the task of printing barcodes to an external DLL. SAP does not provide a barcode DLL.
The DLL must meet certain requirements so that it can be used.
Interface specifications:
Introduction:
-----------
SAPSprint should be able to output barcodes under windows on any Windows printer. This function should be allowed by an external DLL which is called by SAPSprint, if required.
The external barcode DLL is responsible for the appropriate display of the code including the calculation of check digits and the text itself.
Name:
-----
The SAPSprint expects a DLL with the name BARCODE.DLL in the Windows directory, the Windows System directory, or the SAPSprint work directory. For front-end printing with control technology (SAPSprint), the BARCODE.DLL must be in the SAPGUI directory.
Interface:
----------
The interface for the barcode DLL consists of two functions.
bool BarcodeInit (far char *buff, int bufflen)
----------------------------------------------
The function is called when a print job is started.
The parameter "buff" points to a buffer of length
bufflen. In this buffer, the barcode DLL sets a
string which SAPSprint issues in job log file.
This string should basically supply information using the
manufacturer of the DLL and the version number.
The function returns 0 if initialization
succeeded.
int BarcodePrint (HDC hPr, struct barcode *bc_ptr)
---------------------------------------------------
The function is called when printing a barcode. The
parameter hPr contains the GDI device context for the output device.
The parameter bc_ptr points to a control block that
contains information on the barcode.
Return codes:
0: OK
<> 0: An error occurred. In this case, the user
must set the pointer errmsg in the control block accordingly.
The control block is defined as follows:
struct barcode
{
short protovers;
long xpos;
long ypos;
long hsize;
long vsize;
char far* str;
int strlength;
int check;
int label;
int fontsize;
int hspacing;
int codeid;
long code;
int scale_s1;
int scale_s2;
int scale_s3;
int scale_s4;
int scale_l1;
int scale_l2;
int scale_l3;
int scale_l4;
char far * errmsg;
}
The parameters in detail:
protovers:
describes the log version used.
is set to 3 by SAPSprint
xpos:
ypos:
When you call the function BarcodePrint, these fields are
supplied with the current SAPSprint cursor. The barcode output
starts at this point (lower left corner of the barcode).
The DLL puts the final coordinates of the barcode into these
fields as a return value.
The specifications refer to the current Windows MapMode.
hsize:
vsize:
The required size of the barcode is set here.
If -1 is transferred, the barcode is set to its standard size.
(For log version 3, always set to 1)
str:
str points to interchange data. The length is determined by strlen.
In log version 3 all attributes of the barcode are determined
. Parameters are separated by commas.
Until now the following conventions exist:
(Improvements should be reported to SAP, so that they can be
published here):
C= Choice of barcode (for values see codeid)
B= Width of the barcode in millimeters
(for B=0 the width is determined by the Sx and Lx parameters)
H= Height of the barcode in millimeters
(H > 0: lower left corner = (xpos,ypos)
H < 0: upper left corner = (xpos,ypos))
P= Check sum (like parameter check)
A= Label (0/1 as parameter is labelled)
X= X position for barcode in millimeters from the left margin
Y= Y position for barcode in millimeters from the upper margin
(X and Y determine an absolute position that does
not depend on xpos and ypos)
S1..S4 Setting of the stripe width
Defaults: S1=6, S2=12, S3=18, S4=24
L1..L4 Setting of the gap widths
Defaults: L1=6, L2=12, L3=18, L4=24
(If B=0 was specified, these values should be taken as a pixel
for the print resolution. Otherwise just define ratios for
defining the stripes and gaps in the total width of
the barcode that you request.)
R= (0, 90, 180, 270) barcode to rotate the specified degree
clockwise (default 0)
%=
strlength:
contains the length of the interchange data transferred.
check:
determines, whether a check-sum is calculated and returned.
0: no check-sum
1: with check-sum (for MSI with 1 Mod 10)
2: for MSI with 2 Mod 10
3: for MSI with 1 Mod 11, 1 Mod 10
4: for MSI with 1 Mod 11, 1 Mod 10
-1: Use the default for the respective barcode. (log version 3)
label:
checks the text of the barcode.
0: Without text
1: With text
-1: Use the default for the respective barcode.
fontsize:
Fontsize checks the size of the text font.
This is specified according to the current MapMode.
(always 0 for log version 3)
hspacing:
Hspacing checks the character spacing in the text.
This is specified according to the current MapMode.
(here, the increment of the font is copied)
codeid: (Description equals those for device type SWIN in Release 4.6A)
Selection of the required barcode.
The following constants are defined:
(character string SAPscript- Print-
for log 3) Name control
1 2 of 5 Industrial 25I
2 2 of 5 Interleaved 25L BC_I25C SBP14
BC_I25 SBP15
3 2 of 5 Matrix 25M
4 Codabar CODA
5 Code 39 39 BARCLVS SBP03
BC_CD39 SBP11
BC_CD39C SBP16
6 Code 39 Extended 39E
7 Code 93 93
8 Code 93 Extended 93E
9 Code 128 Subset B 128B ARTNR SBP01
AUFNR SBP02
KUNAUNR SBP04
KUNAUPS SBP05
MBBARC SBP06
RSNUM SBP08
RSPOS SBP09
RUECKNR SBP10
BC_C128B SBP21
10 EAN 8 E8 MBBARC1 SBP07
BC_EAN8 SBP12
11 EAN 8 with 2 places extra E8+2
12 EAN 8 with 5 places extra E8+5
13 EAN 13 E13 BC_EAN13 SBP13
14 EAN 13 with 2 places extra E13+2
15 EAN 13 with 5 places extra E13+5
16 UPC A UA
17 UPC A with 2 places extra UA+2
18 UPC A with 5 places extra UA+5
19 UPC D-1 UC1
20 UPC D-2 UC2
21 UPC D-3 UC3
22 UPC D-4 UC4
23 UPC D-5 UC5
23 UPC E UCE
24 UPC E with 2 places extra UCE+2
25 UPC E with 5 places extra UCE+5
26 UCC/EAN-128 E128 BC_EANH SBP22
27 SSCC18 SSCC18
28 MSI MSI BC_MSI SBP17
BC_MSIC SBP18
BC_MSIC1 SBP19
BC_MSIC2 SBP20
29 USPS Postnet 5 PSN5 BC_PSN5 SBP23
30 USPS Postnet 9 PSN9 BC_PSN9 SBP24
0 DEFAULT The default barcode is used. This can, if necessary,
be copied from information in the interchange data
(log version 3)
The above list represents the list of barcodes which are supported
by most normal laser printers.
The DLL should support all of the named barcodes.
code: reserved.
scale_s1:
scale_s2:
scale_s3:
scale_s4:
scale_l1:
scale_l2:
scale_l3:
scale_l4:
Scaling information on individual stripe widths and
vertical line spacing. The individual correction factors for the printer
can be set with these values.
The measurement specification is carried out according to the current MapMode settings.
The value 0 represents the default barcode width.
(not initialized for log version 3)
errmsg:
If an error occurs, the barcode DLL can store a pointer to an error
text in this variable. This text is
logged by SAPSprint as an error message.
This interface should be available from commercial suppliers.
The following list is of suppliers known to us that
manufacturer compatible barcode DLL:
1) e-bizco.com GmbH, Up'n Hoff 1, D-22927 Großhansdorf, Germany
Tel. +49/4102/6919049
Fax. +49/4102/6919047
E-Mail: info@e-bizco.com
URL: www.e-bizco.com
Note : e-bizco offers a free demo version.
2) TEC-IT Datenverarbeitung GmbH, Wagnerstr. 6, A-4400 Steyr, Austria
Tel. +43/7252/72720
Fax +43/7252/72720-77
E-Mail: sap@tec-it.com
URL: www.tec-it.co.at
3) MW6 Technologies, Inc.
Suite 700, One Executive Place
1816 Crowchild Trail NW Calgary, AB T2M 3Y7 Canada
Tel::+1(403) 451-4930
Fax: +1(403) 220-1389
Emails: info@mw6tech.com (general inquiries)
support@mw6tech
sales@mw6tech.com (orders & pre-sales)
URL: www.mw6tech.com
Note : MW6 also offers a free demo version.
No comments:
Post a Comment