I am attempting to write a print capture utillity for some very old machines that we have.
The machines produce a results page that contains lots of sections that are seperated with line art i.e | _ ¬ etc. Normally the machines print via a parallel port to a centronics printer, I have removed the printer and replaced it with a parallel-to-serial converter which then connects into my PC.
Using the OnComm event I can capture the data. I've tried using Serial.InputString, Serial.InputArray and also Agraham's SerialEx library in which I am able to set the encoding type. But no matter what I do I am unable to display the lines as they should be.
Now I am wondering if the problem is actually to do with the TextBox and the Font that is being used?
Is it possible to select which Font the TextBox use's and does anyone know which Font I should choose?
Attached is a file that contains the raw data that I grabbed using Serial.InputArray. This almost displays correctly in Notepad so I know that I'm nearly there.
I think (but I'm not sure) that I need some of the characters from this codepage http://unicode.org/charts/PDF/U2300.pdf.
And I know that the decimal values of the characters that are not being displayed correctly are -
179 - Vertical line
191 - Top right-hand corner
192 - Bottom left-hand corner
196 - Horizontal line
217 - Bottom right-hand corner
218 - Top right-hand corner
I also get a value 255 where I would expect to get a space, I can't explain this but it's something that I can live with as it only occurs twice and is part of a section title.
Also attached is my work in progress :BangHead:
Any help is as always very gratefully received.
Thanks,
RandomCoder
The machines produce a results page that contains lots of sections that are seperated with line art i.e | _ ¬ etc. Normally the machines print via a parallel port to a centronics printer, I have removed the printer and replaced it with a parallel-to-serial converter which then connects into my PC.
Using the OnComm event I can capture the data. I've tried using Serial.InputString, Serial.InputArray and also Agraham's SerialEx library in which I am able to set the encoding type. But no matter what I do I am unable to display the lines as they should be.
Now I am wondering if the problem is actually to do with the TextBox and the Font that is being used?
Is it possible to select which Font the TextBox use's and does anyone know which Font I should choose?
Attached is a file that contains the raw data that I grabbed using Serial.InputArray. This almost displays correctly in Notepad so I know that I'm nearly there.
I think (but I'm not sure) that I need some of the characters from this codepage http://unicode.org/charts/PDF/U2300.pdf.
And I know that the decimal values of the characters that are not being displayed correctly are -
179 - Vertical line
191 - Top right-hand corner
192 - Bottom left-hand corner
196 - Horizontal line
217 - Bottom right-hand corner
218 - Top right-hand corner
I also get a value 255 where I would expect to get a space, I can't explain this but it's something that I can live with as it only occurs twice and is part of a section title.
Also attached is my work in progress :BangHead:
Any help is as always very gratefully received.
Thanks,
RandomCoder