esthera
01-24-2008, 02:46 PM
can someone help me modify my code below to do wordwrap but not go to the next line if it's in middle of a word
strTextToBeWrapped="helow htisi is test hi how are you today ok ok will htis work"
response.write srtexttobewrapped & "<hr>"
'pdf.addtextpos 500,625 ,strTextToBeWrapped ' & "balance"
myline=625
origstring=strTextToBeWrapped
strLength = Len(OrigString)
intPosition = 1
StrWrapNumber = 30
StrLoop = StrLength\ StrWrapNumber
If StrLoop > 0 then
For LoopStep = 0 to StrLoop
WrapString = Mid(OrigString, intPosition, StrWrapNumber)
' pdf.addtextpos 300,625 ,wrapstring
response.write wrapstring & "<bR>"
myline=myline+10
intPosition = intPosition + StrWrapNumber
Next
Else
Response.Write OrigString
End if
strTextToBeWrapped="helow htisi is test hi how are you today ok ok will htis work"
response.write srtexttobewrapped & "<hr>"
'pdf.addtextpos 500,625 ,strTextToBeWrapped ' & "balance"
myline=625
origstring=strTextToBeWrapped
strLength = Len(OrigString)
intPosition = 1
StrWrapNumber = 30
StrLoop = StrLength\ StrWrapNumber
If StrLoop > 0 then
For LoopStep = 0 to StrLoop
WrapString = Mid(OrigString, intPosition, StrWrapNumber)
' pdf.addtextpos 300,625 ,wrapstring
response.write wrapstring & "<bR>"
myline=myline+10
intPosition = intPosition + StrWrapNumber
Next
Else
Response.Write OrigString
End if