Dear,
Does the lenght of the text exceed the textbox width??
No, the text being entered on screen fits in the text box. But when saved as PDF, it cuts off half of the text.
Dear,
It's true I tried it, somehow half of the text disappeard
I suggest you change some stuff in your formview and it will look better if you do the following
add datalable to your formview and give it property WRAP TEXT
before saving as PDF add the following rules
1 transfare textbox to datalable
2 hide textbox
3 save as PDF
Hi Mustafa,
This is precisely what i did to get it working, but it tooks me a long time because I have multiple fields....
It is a pain having to do a hide, then show for each field and data label. This doubles the amount of controls on the view as well..
Surely if the screen is displaying it all, why isn't the PDF taking a snapshot correctly?
I feel this needs to be addressed as a bug fix with K2.
Mustafa, thanks for your help as always bro.
Dear,
you're most welcome
as soon as i find a solution for this i'll let you know ;)
Yep, this is really annoying.
I too had this issue and my form/view had a 40-50 text boxes, so fixing problem with each one was a big challenge.
I could fix the issue by making changes in the form instead:
- Add a hidden data label
- In the Form Initializing rule add a Transfter data action as last action
- Add the javascript "<script type="text/javascript"> $("textarea").each(function () { this.style.height = (this.scrollHeight+1)+'px'; }); </script>" to the data label
Done!
Try to generate the PDF and see if all text is visible in the PDF file. If not, try to increase the scrollHeight in the javascript and try again...
Though, it is not a great solution but you can achive this with less changes and making it common than changing each control properties etc.
PS: Using javascript adjusts the height of the textboxes and adds a blank line after the last line in every text box on the form. However, it should not matter much as long as it is acceptable and you can generate PDF as you want. In case, you need to apply the height to some particular text boxes then tweak the javascript to identify those text boxes and apply the height to only those text boxes.