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

Retrieving Into JavaScript Variable Data from Windows Clipboard

eganopperman
Registered: Jul 1 2007
Posts: 4

Is it possible in Acrobat JavaScript to pass the contents of the Window's clipboard to a JavaScript variable? Searching around the Internet I found postings stating that the below javascript statement could read the contents of the clipboard into a variable. However, when I try to run it in the Acrobat debugger I get the following error message:

var content = clipboardData.getData("Text");
app.alert(content);
clipboardData is not defined
1:Console:ExecException in line 1 of function top_level, script Console:Exec

clipboardData is not defined
1:Console:Exec
undefined
1

TIA. Egan.

lkassuba
ExpertTeam
Registered: Jun 28 2007
Posts: 3636
ClipboardData isn't an Acrobat Javascript object.

Lori Kassuba is an AUC Expert and Community Manager for AcrobatUsers.com.

gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
To access both JavaScript objects and Windows objects, you would need to write a plugin for Acrobat/Reader.

George Kaiser