Javscript would provide a navigation menu here. HOME
Here I would like to decribe the steps to use the ITC ActiveX lineprinter DLLs sucessfully.
First you need the developer library (I tested with 2.5, earlier versions may work too). You will find the necessary DLLs below the directory Intermec\Developer Library\Printing Resource Kit\Runtime. For my tests on a 730 with WM2003 (OS firmware 4.96/PSM4.06) I used the ones from "\Intermec\Developer Library\Printing Resource Kit\Runtime\WCE420\Pocket PC 2003\Armv4":
lineprtdll.dll
lineptr.dll
These DLLs must be copied to the Windows dir on the device and they MUST be registered
For Cab install there is a feature called self-registering and so I created a cab file with the DLLs and they will be installed and registered automatically. You can download the cab "HGO LinePrinter.cab" here, the cab also installs the html sample page and an sample of the essential wince.ini to device and the Start Menu of the device.
Browsing below the "Printing Resource Kit" dir, you will find a sample called SampleCE (see Intermec\Developer Library\Printing Resource Kit\Examples\C++\ActiveX). A local copy of the source is here and a compiled ARM version is here. I recommend you run the SampleCE exe before you try the html sample.
Do not forget to have the right WinCe.ini in \Windows\Start Menu! The printer selection from inside the exe or the html MUST match an entry in this WinCe.ini! I did my tests with a BT connected (COM6) PB40.
...
void CPrtDlg::OnButtonPrint()
{
long
lRet = 0;
TCHAR szTmp[256];
BOOL
bContinuousFeed = TRUE;
CString
szINIFILE(_T("Intermec\\Printers"));
CString
szININAME(_T("\\windows\\start menu\\wince.ini"));
CString
szPRINTERNAME;
m_bCancelPrint = FALSE;
g_bPrint80ColumnReport
= TRUE;
if(IsDlgButtonChecked(IDC_PRINTER1))
{
szPRINTERNAME.Empty();
szPRINTERNAME += _T("Intermec 6808
40-Column");
g_bPrint80ColumnReport
= FALSE;
}
if(IsDlgButtonChecked(IDC_PRINTER2))
{
szPRINTERNAME.Empty();
szPRINTERNAME += _T("Intermec 6808
80-Column");
}
if(IsDlgButtonChecked(IDC_PRINTER3))
{
szPRINTERNAME.Empty();
szPRINTERNAME += _T("Intermec 6820
NPCP");
bContinuousFeed = FALSE;
}
if(IsDlgButtonChecked(IDC_PRINTER4))
{
szPRINTERNAME.Empty();
szPRINTERNAME += _T("Intermec PB20");
g_bPrint80ColumnReport = FALSE;
}
TRY{
lRet = m_Lptr.StartLP(szINIFILE,
szPRINTERNAME,
NULL,(long)(this->GetSafeHwnd()),
szININAME);
...
The WinCe.ini syntax is described in the help file Printing_Resource_Kit.CHM in your "Intermec\Developer Library\Printing Resource Kit\Documents" directory.
I got a html sample and slighty modified it to match my WinCe.ini.
function DoPrint1()
{
var iSuccess = 0;
var hwnd = 0;
g_bCancelPrint = false;
iSuccess = LinePrinter.StartLP("Intermec\Printers", "Intermec PB20", "", hwnd, "\\windows\\start menu\\WinCE.ini");
if(iSuccess == 0)
{
g_bPrint80ColumnReport = false;
PrintSample40()
LinePrinter.Finish();
}
else
{
alert("STARTLP FAILED: " + iSuccess);
}
}
If you press btn1 it will print to the printer defined as [Intermec PB20] inside WinCe.ini.
[Intermec\Printers
[PrinterPorts]
Port1=COM1:,1200,n,8,1,cdtr
Port2=COM1:,2400,n,8,1,cdtr
Port3=COM1:,4800,n,8,1,cdtr
Port4=COM1:,9600,n,8,1,cdtr
Port5=COM1:,14400,n,8,1,cdtr
Port6=COM1:,19200,n,8,1,cdtr
Port7=COM1:,38400,n,8,1,cdtr
Port8=COM1:,56000,n,8,1,cdtr
Port9=COM1:,128000,n,8,1,cdtr
Port10=COM1:,256000,n,8,1,cdtr
Port11=IRDA
Port12=NPCP,COM1:
Port13=NPCP,COM6:
Port14=WPPORT,y
[Intermec PB40]
EntryName=Port14
PortName=
InitSeq=0x1b,0x40,0x0d
PrintableLines=57
BoldOnSeq=0x1b,G
BoldOffSeq=0x1b,H
NormalFontSeq=0x1b,!,0x00
DoubleWideFontSeq=0x1b,!,0x20
CompressFontSeq=0x1b,!,0x04
FormFeedSeq=0x0c
GraphModeInitSeq=
GraphModeExitSeq=
GraphPrefixSeq=0x1b,L,0xC0,0x03
GraphPostfixSeq=13,0x1b,J,0x18
GraphXDots=960
GraphNumPins=8
GraphCharHeight=12
GraphCharWidth=12
[Intermec PB20]
EntryName=Port14
PortName=
InitSeq=0x1b,0x40,0x0d
PrintableLines=57
BoldOnSeq=0x1b,G
BoldOffSeq=0x1b,H
NormalFontSeq=0x1b,!,0x00
DoubleWideFontSeq=0x1b,!,0x20
CompressFontSeq=0x1b,!,0x04
FormFeedSeq=0x0c
GraphModeInitSeq=
GraphModeExitSeq=
GraphPrefixSeq=0x1b,L,0xC0,0x03
GraphPostfixSeq=13,0x1b,J,0x18
GraphXDots=960
GraphNumPins=8
GraphCharHeight=12
GraphCharWidth=12
...
last update 19. June 2007