These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Copying & Pasting text into fields from another program changes the font

Slivar
Registered: May 29 2010
Posts: 16

Hi Guys,
 
I have a question and hopefully it's not too complex, and somebody can help me out quickly.
 
I have a text field that is multiline, with rich text formatting selected.
The font I have selected in the field's properties is Swiss BT.
 
The problem is, when I copy and paste text from another application such as TextEdit using Arial, the font when pasted in the field changes to the font TextEdit which is Arial.
 
My question is if its possible, how do I paste into the field without changing the font (I want it to be Swiss BT) but at the same time, without losing the ability to have rich text formatting within that field eg Bold, italic, bold italic etc.
 
I do know that if I turn off RTF, it does exactly what I'm after, but I lose the ability to format the text within the field.
 
Any help would be greatly appreciated.
 
Thanks
Sash

My Product Information:
Acrobat Pro 10.0.2, Macintosh
Merlin
Acrobat 9ExpertTeam
Registered: Mar 1 2006
Posts: 766
Hi,

Disable the RTF option, paste the text, then enable back the RTF option.
;-)
Slivar
Registered: May 29 2010
Posts: 16
Thanks for the quick response.

However, that's not what I'm after. My client might be pasting the text from another program such as Word for example.
They also won't be able to enable the RTF option because of a) they don't have Acrobat Pro & b) if they did, their skill level is novice and they wouldn't be able to do it anyhow.Is there another way, perhaps with the use of a script?

Thanks
Sash
maxwyss
Registered: Jul 25 2006
Posts: 255
Well, if you MUST have the richText property on, what you can do is to process the field in the Validation event, where you analyze the Span objects, and set the fonts accordingly. Although that may or may not interfere with your other formatting.

Hope this can help.

Max Wyss.


Slivar
Registered: May 29 2010
Posts: 16
Thanks for the response Max.
How exactly do you do what you just said?
Do you have any instructions that you can give me?

Thanks
Sash
maxwyss
Registered: Jul 25 2006
Posts: 255
As you would have to understand what you are doing, I'd suggest to have a closer look at the Acrobat JavaScript documentation (part of the SDK). There you will have to look at the Span object, as well as the methods and properties dealing with richText.

Hope this can help.

Max Wyss.