Hi All,
Is there any way to know:
1. Prow() and Pcol() ie, co-ordinate of printer head.
2. Height and width of a particular piece of text for a specific font.
Thanks in advance.
With best regards.
Sudip
PRow, PCol positon of prinetr head
Moderator: Rathinagiri
PRow, PCol positon of prinetr head
With best regards,
Sudip
Sudip
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: PRow, PCol positon of prinetr head
Regarding the first question, I don't know.
For the second question, there is a way. I had already mentioned here.
A font's size is specified in units called points. A point is .013837 of an inch. Following the point system devised by Pierre Simon Fournier, it is common practice to approximate a point as 1/72 inch. So, the height of a font of 12 points is 12/72*25.4 mm.
Regarding the length, I had used a handy function in grid2print utility. Even though it is an approximation, it works at 99% accuracy.
This function returns the width of a given text in mm once you pass on the parameters string, fontsize and fontname.
For the second question, there is a way. I had already mentioned here.
A font's size is specified in units called points. A point is .013837 of an inch. Following the point system devised by Pierre Simon Fournier, it is common practice to approximate a point as 1/72 inch. So, the height of a font of 12 points is 12/72*25.4 mm.
Regarding the length, I had used a handy function in grid2print utility. Even though it is an approximation, it works at 99% accuracy.
Code: Select all
function printLen( cString,nFontsize,cFontname)
return round(gettextwidth(Nil,cString,cFontname)*0.0254*nFontsize,2)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: PRow, PCol positon of prinetr head
Hello Rahi,
Oh, yes! I forgot it.
Sorry for for repeating query
I hope following functions (created by you) will be helpful regarding prow(), pcol()
(Esgici, my brother, you guess the reason of my forgetfulness. Yes, using 3/4 watches So, I can't tell the exact time. But, believe me I am using my favorite watch only for checking time )
Thank you all.
Regards.
Sudip
Oh, yes! I forgot it.
Sorry for for repeating query
I hope following functions (created by you) will be helpful regarding prow(), pcol()
Code: Select all
unction c2mm(ncol)
return (ncol/80 * 210) // 80 is the number of columns in your old dos application. 210 is the width of the paper in windows.
Function R2mm(nRow)
return (nRow/66 * 297) // 66 is the number of rows in the old dos app. 297 is the height of paper
Thank you all.
Regards.
Sudip
With best regards,
Sudip
Sudip