bluetooth print follow
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
bluetooth print follow
Antonio
Is there any reasonable chance i can get a fix on the above problem ?
I have to deliver the printer and the app next tuesday.
Thanks for reply
Richard
Is there any reasonable chance i can get a fix on the above problem ?
I have to deliver the printer and the app next tuesday.
Thanks for reply
Richard
- Antonio Linares
- Site Admin
- Posts: 42519
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 75 times
- Contact:
Richard,
Could you check if this function returns .T. ?
You already tested it but we did not check the returned value. Thanks,
Could you check if this function returns .T. ?
Code: Select all | Expand
HB_FUNC( WRITE233 ) // hComm --> lOk
{
DWORD cBytes;
unsigned char ch = 233;
hb_retl( ( BOOL ) WriteFile( ( void * ) hb_parnl( 1 ), &ch, 1, &cBytes, NULL ) );
}
You already tested it but we did not check the returned value. Thanks,
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
- Antonio Linares
- Site Admin
- Posts: 42519
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 75 times
- Contact:
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Yes no problem
Even the txt file created from fwppc can be printed OK when selected and sent via bluetooth to the printer.
To make it clear, my app first generates a txt file then sends it to the printer.
This is why i asked for a workaround if we can simulate the "send via bluetooth" from fwppc, the problem is fixed as the printout is perfect
Richard
Even the txt file created from fwppc can be printed OK when selected and sent via bluetooth to the printer.
To make it clear, my app first generates a txt file then sends it to the printer.
This is why i asked for a workaround if we can simulate the "send via bluetooth" from fwppc, the problem is fixed as the printout is perfect
Richard
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Maybe a sloution ? Font problem ?
Anonio
This is the last test i did, here is the code
#include "C:\FWPPC\INCLUDE\FWCE.ch"
#define GENERIC_READ 0x80000000
#define GENERIC_WRITE 0x40000000
#define GENERIC_REWRITE 0xC0000000
#define OPEN_EXISTING 3
#define FILE_ATTRIBUTE_NORMAL 0x00000080
#define FILE_FLAG_OVERLAPPED 0x40000000
function Main()
LOCAL HOUT1,CFILE
cfile := CurDir() + "TEST.txt"
IF FILE(CFILE)
ferase(cfile)
ENDIF
HOUT1 := fCreate( cFile )
FWRITE( HOUT1, "THIS IS A NON ACCENTED LINE" + CRLF )
FWRITE( HOUT1, "àéè€ù° Accented LINE" + CRLF )
fClose( hOut1 )
Sendblue( MemoRead(cfile))
// SENDBLUE("àéè€ù° Accented LINE") THIS DOES NOT WORK ACCENTED CHARS DO NOT SHOW
RETURN Nil
STATIC FUNCTION SENDBLUE(ctext)
LOCAL i, hOut
hOut := CreateFile( "COM5:",GENERIC_WRITE, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL )
IF hOut==-1
MsgStop("Port Not Found")
ELSE
FOR i = 1 TO Len( cText )
WriteByte( hOut, Asc(SubStr( cText, i, 1 ) ) )
NEXT
CloseHandle( hOut )
ENDIF
return nil
The printout direct from fwppc is bad , i have scanned it , you can see it at
www.cbati.com/fwppc.jpg
The printout that comes out of the txt file is OK you can see it at
www.cbati.com/txt.jpg
Now just a confirmation, as far as i know, Ascii codes are related to fonts, Isn't it so ? What is the default font set by the pocket and how to change it to "courrier new" for instance before transmitting ?
Can this be the problem ?
Thanks for the reply
Richard
This is the last test i did, here is the code
#include "C:\FWPPC\INCLUDE\FWCE.ch"
#define GENERIC_READ 0x80000000
#define GENERIC_WRITE 0x40000000
#define GENERIC_REWRITE 0xC0000000
#define OPEN_EXISTING 3
#define FILE_ATTRIBUTE_NORMAL 0x00000080
#define FILE_FLAG_OVERLAPPED 0x40000000
function Main()
LOCAL HOUT1,CFILE
cfile := CurDir() + "TEST.txt"
IF FILE(CFILE)
ferase(cfile)
ENDIF
HOUT1 := fCreate( cFile )
FWRITE( HOUT1, "THIS IS A NON ACCENTED LINE" + CRLF )
FWRITE( HOUT1, "àéè€ù° Accented LINE" + CRLF )
fClose( hOut1 )
Sendblue( MemoRead(cfile))
// SENDBLUE("àéè€ù° Accented LINE") THIS DOES NOT WORK ACCENTED CHARS DO NOT SHOW
RETURN Nil
STATIC FUNCTION SENDBLUE(ctext)
LOCAL i, hOut
hOut := CreateFile( "COM5:",GENERIC_WRITE, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL )
IF hOut==-1
MsgStop("Port Not Found")
ELSE
FOR i = 1 TO Len( cText )
WriteByte( hOut, Asc(SubStr( cText, i, 1 ) ) )
NEXT
CloseHandle( hOut )
ENDIF
return nil
The printout direct from fwppc is bad , i have scanned it , you can see it at
www.cbati.com/fwppc.jpg
The printout that comes out of the txt file is OK you can see it at
www.cbati.com/txt.jpg
Now just a confirmation, as far as i know, Ascii codes are related to fonts, Isn't it so ? What is the default font set by the pocket and how to change it to "courrier new" for instance before transmitting ?
Can this be the problem ?
Thanks for the reply
Richard
- Antonio Linares
- Site Admin
- Posts: 42519
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 75 times
- Contact:
Richard,
> Ascii codes are related to fonts, Isn't it so ?
Ascii codes are numbers from 0 to 255, to select a char from the used chars table (of a font).
The used font must be selected from the bluetooth printer. I guess we can not select it from the Pocket PC as we are just sending bytes to a "file", unless some combination of them may specify to use a special font for the bluetooth printer. I may be wrong
> Ascii codes are related to fonts, Isn't it so ?
Ascii codes are numbers from 0 to 255, to select a char from the used chars table (of a font).
The used font must be selected from the bluetooth printer. I guess we can not select it from the Pocket PC as we are just sending bytes to a "file", unless some combination of them may specify to use a special font for the bluetooth printer. I may be wrong
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Antonio
Open UESTUDIO, VIEW, ASCII TABLE
Code 233 is OK in major fonts and it displays é correct
Select "Terminal" as font and you will see that the retreived codes look a lot like what is being printed... This is what makes me think of a font problem.
The txt file you see the image in my previous post has been printed from the pocket pc through file explorer, send via bluetooth. So the printer can print the codes when coming from an ascii txt file.... If i could send automatically the txt file to the printer (like file explorer does), that would be great, but i have not found how. Any idea ?![Confused :?](./images/smilies/icon_confused.gif)
Open UESTUDIO, VIEW, ASCII TABLE
Code 233 is OK in major fonts and it displays é correct
Select "Terminal" as font and you will see that the retreived codes look a lot like what is being printed... This is what makes me think of a font problem.
The txt file you see the image in my previous post has been printed from the pocket pc through file explorer, send via bluetooth. So the printer can print the codes when coming from an ascii txt file.... If i could send automatically the txt file to the printer (like file explorer does), that would be great, but i have not found how. Any idea ?
![Confused :?](./images/smilies/icon_confused.gif)
- Antonio Linares
- Site Admin
- Posts: 42519
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 75 times
- Contact:
- Enrico Maria Giordano
- Posts: 8753
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 4 times
- Contact:
Richard Chidiak wrote:Code 233 is OK in major fonts and it displays é correct
If you are absolutely sure (how?) that the printer receives the correct code from the palmtop then it could mean that the printer itself expects a different code (ie. you have to make a conversion before sending the characters to it).
EMG
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Enrico
My fwppc app creates on the pocket pc a txt file containing accented chars like 223.
Printing on the pocket pc (not from fwppc) but from file explorer to the printer prints all the chars perfect !
The chars can not be printed from fwppc and i suspect a font problem not from the printer ! There are no settings on the printer. I tested through 2 different printers and 4 different pocket pcs. i think the problem is in fwppc. I hope someone else can test accented chars on Bluetooth printing and confirm the problem. Anyone ?
EMG :> you have to make a conversion before sending the characters to it
This is what i wanted to avoid . Very risky.
I will abandon printing from fwppc till we find a correct solution and ask the users to select the txt file and print it via file explorer. I will search also if i can find a program that can send files to BT printer and see if it can be called from a fwppc app.
I am not happy with this, it is the first time we deliver a problematic app ! And we have to deliver tomorrow !
Richard
My fwppc app creates on the pocket pc a txt file containing accented chars like 223.
Printing on the pocket pc (not from fwppc) but from file explorer to the printer prints all the chars perfect !
The chars can not be printed from fwppc and i suspect a font problem not from the printer ! There are no settings on the printer. I tested through 2 different printers and 4 different pocket pcs. i think the problem is in fwppc. I hope someone else can test accented chars on Bluetooth printing and confirm the problem. Anyone ?
EMG :> you have to make a conversion before sending the characters to it
This is what i wanted to avoid . Very risky.
I will abandon printing from fwppc till we find a correct solution and ask the users to select the txt file and print it via file explorer. I will search also if i can find a program that can send files to BT printer and see if it can be called from a fwppc app.
I am not happy with this, it is the first time we deliver a problematic app ! And we have to deliver tomorrow !
Richard
- Enrico Maria Giordano
- Posts: 8753
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 4 times
- Contact:
Richard Chidiak wrote:Enrico
My fwppc app creates on the pocket pc a txt file containing accented chars like 223.
It's not the same as sending characters through bluetooth. You are still not sure what the printer really receives.
Richard Chidiak wrote:Printing on the pocket pc (not from fwppc) but from file explorer to the printer prints all the chars perfect !
The chars can not be printed from fwppc and i suspect a font problem not from the printer !
If the printer only receives ASCII characters then I can't see how font concept fits this scenario. We have to investigate, I repeat, on what exactly comes out from the bluetooth and I don't know of any other way than connecting the bluetooth cable to a PC and directly read and show each single character that is received.
EMG
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Emg>It's not the same as sending characters through bluetooth. You are still not sure what the printer really receives.
This has been tested also with the same result
As per Ascii chars, they are different with fonts !!!!
Look at 223 ascii char forr example in Courrier new or Terminal font or system font, you will see it is displayed quite differently.
EMG>I repeat, on what exactly comes out from the bluetooth and I don't know of any other way than connecting the bluetooth cable to a PC and directly read and show each single character that is received.
How ? i have tried without success, any sample ?
Thanks for your help,
Richard
This has been tested also with the same result
As per Ascii chars, they are different with fonts !!!!
Look at 223 ascii char forr example in Courrier new or Terminal font or system font, you will see it is displayed quite differently.
EMG>I repeat, on what exactly comes out from the bluetooth and I don't know of any other way than connecting the bluetooth cable to a PC and directly read and show each single character that is received.
How ? i have tried without success, any sample ?
Thanks for your help,
Richard
- Enrico Maria Giordano
- Posts: 8753
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 4 times
- Contact:
Richard Chidiak wrote:As per Ascii chars, they are different with fonts !!!!
Font is not something related in any way to Ascii format. Ascii format is not something similar to RTF, PDF, DOC, etc. It is far simpler and not able to represent fonts.
Richard Chidiak wrote:Look at 223 ascii char forr example in Courrier new or Terminal font or system font, you will see it is displayed quite differently.
But the printer still receives code 223 and there is nothing that the sender can do. If the printer really receives 223 from both bluetooth (via FWPPC) and text file (via Explorer) then it has to print the same char. As long as the printed chars are different then the printer is clearly receiving different codes.
Richard Chidiak wrote:How ? i have tried without success, any sample ?
No, sorry.
EMG
- Antonio Linares
- Site Admin
- Posts: 42519
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 75 times
- Contact: