Kbase P87115: How to use IDAutomation Activex and xprint.dll in order to print barcodes?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/16/2008 |
|
Status: Unverified
GOAL:
How to use IDAutomation Activex and xprint.dll in order to print barcodes?
GOAL:
How to print barcodes ?
FACT(s) (Environment):
Progress 9.x
FIX:
1 - Instantiate the IDAutomation Control in your SmartWindow.
2 - Add the following code to the choose trigger of a button:
chCtrlFrame:Barcode:BarHeight = 1.
chCtrlFrame:BarCode:FixedResolutionCM = 118. /*for 300 dpi image 300/2.54=118*/
chCtrlFrame:BarCode:SetPixelsXY(400, 100). /*set the size of the image*/
chCtrlFrame:BarCode:DataToEncode="12345678901".
chCtrlFrame:BarCode:SaveEnhWMF("C:\barcode.wmf").
XPixels = chCtrlFrame:BarCode:GetXPixels().
RUN "printmybarcode.p".
3 - Create a text file called mytags.txt containing the following tag:
<IMAGE(200,200,800,900)c:\barcode.wmf>
4 - Create a 4GL program called printmybarcode.p:
PROCEDURE printFile EXTERNAL "xPrint.dll" :
DEF INPUT PARAMETER A AS CHAR.
END.
RUN printFile("c:\mytags.txt").