Java Script to allow character spacing in editable PDF?

So, through this forum, I have learned how to have text displayed when I have created editable text boxes in acrobat (thank you, George Johnson)so that the client can open in Reader and see example text

// If field is blank, display this text
if (!event.value) event.value = "Your name here";

by inserting in to Custom Format Scripts in Text Field Properties......can we take this one step further and space the lettering in this field?
Karen


Karen Thring


2 Answers

Voted Best Answer

Try this script, I think it will do what you want:

var text = event.value;
if (!text) {
    text = "Your name here";
}

text = text.split("").join(" "); 
event.value = text;


By Almir R V Santos   

You can't set the letter spacing, so the best you can do is add one or ore spaces between the letters. It would be possible to automatically do this with a format script, but easier to just do this:

if (!event.value) event.value = "Y o u r  n a m e  h e r e"; 


George Johnson   


Please specify a reason: