Preview: Get PDF contents

Copies the contents of a PDF open in Preview and puts them on the clipboard. Copies images as well. closes PDF Text and images could then be pasted into TextEdit. (Requires UI scripting enabled.)

--Copy PDF Contents
tell application "System Events"
tell process "Preview"
keystroke "a" using command down
delay 1
keystroke "c" using command down
delay 1
keystroke "q" using command down
end tell
end tell