OscarLagatta
Thu Apr 05 06:38:02 CDT 2007
Thank you very much for your answer, let me tell you that the picture is as
follows....
I made a small sales order application using C#, and the purpose is to print
that sales orders using the pocket pc (HP iPAQ serie hx 2700) bloetooth
connection.
The printer is DATAMAX DMX-E-4203 (
http://www.datamaxcorp.com) that has
attached a bluetooth USB Printer Adapter. Uses a particular encoding for the
printing and if I want to print a line, that line should be in a pre format
text file.
eg.
^BL
H07
D11
19110080100002510K OHM 1/4 WATT<CR>
This text will print 10K OHM 1/4 WATT using the printer language.
I've seen many samples but all of them uses ASCIIEncoding and others, then
the ideal scenario would be to send the all the file at once. Then the
printer should be able to understand. Otherwise sending bite by bite won't
print. Like the sample that follows.
http://msdn2.microsoft.com/en-us/library/system.text.asciiencoding.aspx
foreach (Byte b in encodedBytes)
{
_serialPort.Write(String.Format("{0}",b));
}
Than you very much in advance for any help you can give.
Best Regards.
"Peter Foot [MVP]" wrote:
> If you are using a virtual COM port then it's just the same as any other
> serial comms, you should be able to find lots of example code from a google
> search. However the format that your printer accepts will depend on the
> printer type.
>
> Peter
>
> --
> Peter Foot
> Device Application Development MVP
> www.peterfoot.net | www.inthehand.com
>
> "Oscar Lagatta" <OscarLagatta@discussions.microsoft.com> wrote in message
> news:C3132335-C9B2-48FE-ADF5-7069C29792F7@microsoft.com...
> > Hello,
> > Using C# for my CF App, and trying to write to a bluetooth COM8, where the
> > printer is attached. Have no idea how can I use this bluetooth port to
> > write
> > a file to this printer.
> > Anyone can advice me in this regards or knows any C# example.??
> >
> > Thank you very much.
> > Oscar Lagatta
> >
>