Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ACTIVEPDF text in form field is word wrapping incorrectly

Status
Not open for further replies.

OutInLeftField

Programmer
Apr 30, 2002
37
US
I am using ActivePDF Toolkit.

I am retrieving data from a recordset into form fields on a PDF template in ActivePDF Toolkit.
I am concatenating two fields into one variable and inserting that into the Form field on the PDF template.
Sometimes for no particular reason, the wordwrap would cut a word in half or after the first field, the line would break to the next line.

here is the code for that:

do while not rstdefc.EOF
count = count + 1
description_text=trim(rstdefc("description_text"))
charlength = len(description_text)
histcomment = trim(rstdefc("histcomment"))
if not histcomment = "" then
histcomment = replace(histcomment,":"," ")
else
histcomment = ""
end if

if mid(description_text,charlength,1) = "." then
Description = description_text & " " & histcomment
else
if mid(description_text,charlength,1) = "$" then
Description = description_text & " " & histcomment
else
if mid(description_text,charlength,1) = "#" then
Description = description_text & " " & Histcomment
else
if mid(description_text,charlength,1) = ":" then
Description = description_text & " " & histcomment
else
Description = description_text & " " & histcomment
end if
end if
end if
end if

toolkit.SetFormFieldData "Description_Text" & cstr(count),Description,-998
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top