Page 1 of 1
How to determine height for printing large wrapped text
Posted: Thu Feb 25, 2010 7:49 am
by sudip
Hello Friends,
How to determine height for printing large wrapped text for a specific width?
Thanks in advance.
With best regards.
Sudip
Re: How to determine height for printing large wrapped text
Posted: Thu Feb 25, 2010 10:20 am
by sudip
Hello Friends,
I just tested PrintHeight() function with help of Rathi's code:
Code: Select all
function printLen( cString,fontsize,fontname)
return round(gettextwidth(Nil,cString,fontname)*0.072/72*25.4*fontsize,2)
Function PageWidth()
return (GetPrintableAreaWidth() - 2*GetPrintableAreaHorizontalOffset())
Function printHeight(cString, fontsize, fontname, mWidth)
return ceiling(printLen(cString, fontsize, fontname)/mWidth)*NextRow(fontsize+1)
function NextRow(mPoint)
return (mPoint/72*25.4)
Please test and send your comments.
With best regards.
Sudip
Re: How to determine height for printing large wrapped text
Posted: Thu Feb 25, 2010 1:06 pm
by Rathinagiri
Thanks a lot Sudip.
