How to print a file?

Jeanadua

New Member
Licensed User
Longtime User
Hi!!!

Anyone knows how to print a file to a Bluetooth printer?
Is necessary a library to do that?

Regards,

Joan Garcia
 
printing via bluetooth

dear,
can we print from device via bluetooth on b4ppc windows mobile? and how?
sincerely yours
koezuma
 
Last edited:
Upvote 0
Hi,

what do you exactly mean with the 'printing protokol' ?
Serial comunication, or only build a string with text and control codes (like bold on, bold off, etc.) ?
Bevor I spend too much time in learning this Basic dialect, I need to know, if it is possible to do somthing like that on a ESC/POS Printer connected over bluetooth (Pseudocode as example):

Code: Copy
sBoldOn = chr( ...) // ESC/POS control code or ESC/P or ... 
sBuffer = sBoldOn+"Hello World"+sBoldOff+sCRLF+sCRLF+"Normal Text"+sCRLF+sPictureCode
open "COM1" ... for output as #1 
write #1, sBuffer
close #1

I have done this with WinDev Mobile 16 on a Windows Mobile 6.5 phone and it works.
Now I had to translate to android, wich is more work than I thought, but now I can't print, because the android version of WinDev Mobile 16 can't print with sOpen over bluetooth.

I think, that I understand it right and the serial comunication library should do that.

open sender
print
close sender

but I am not shure, because the examples are not printing ...

Thanks for your help.
 
Last edited:
Upvote 0
In case you want to print to a mobile printer like SPrint from Custom.it you might check this site:

S'PRINT BT - Mobile Printer

Custom Printer Manual
(You need to register for the download!)

They explain how to talk to a serial BlueTooth printer and which printer codes to use. It is mainly Escape codes like in the days of the dot matrix printers.

Rolf
 
Upvote 0
Hi,

thanks for the answers.

* using B4A-Server *

It is planed to use smartphones with small printers (ESC/POS) for the people of the field service, reading and storing the consumption measuring values.
This one man can't print on a server, he needs a local thermoprinter, like the italien one, small battery ESC/POS printers.

We wrote a program with WinDev Mobile (we did not know your site at that time = PC SOFT WINDEV: Develop 10 times faster) for Windows Mobile 6.x, this program prints with ESC/POS codes text and grafics over the virtual COM port over the bluetooth port in RAW-mode. That works, but no Handys left :-( ...
The new version of that compiler, does support android too, but not the COM port and only a small bluetooth implementation.
So wie found your side and program.

* the protokol layers

sorry I did not realy understand what the links mean.
Do you think that a serial open and serial print to the port will work
or is the needed transport layer missing in android ?

I have a program from citizen, that prints to the printer, but I don't know
how the handle that, maybe direkt in JAVA ...

I have printed in DOS time to PCL, ESC/P or IBM Proprinter printers with self written printerstreams, but there was only a LPT1 to write on :confused:

Thanks again for all answers :sign0098:

PS: I had prefered using Netbooks with win7 and windows drivers ;-)

Bye
Hubert
 
Last edited:
Upvote 0
:sign0060:

I have tried just use the SERIAL example, connect ... to my printer DPP-250.
Typed in "Hello World" and SEND -> and the printer prints :sign0060:

But when I created my code line with codes ( chr(27)+"E1" ) ...
I became a compiler Error ... and if I use a german character like "Überschrift" ... then the Printer prints a strange char instead of "Ü" ...

My Printer needs Ansi/OEM, chr() creates UNICODE ... are all String UNICODE ?
Is there a function to translate UNICODE Text to ANSI bevor or while streaming over serial ?
 
Upvote 0
Is there a reference somewhere which encodings are supported?

Rolf
 
Upvote 0
Thanks, Klaus, that is exactly what I needed!

Rolf
 
Upvote 0
Back
Top