Search Inside PDF's that have been OCR'd

Kay C Lan lan.kc.macmail at gmail.com
Wed Mar 24 04:10:53 EDT 2010


Sorry Sivakatirswami,

I've had this running for so long I'd forgotten two important steps:

After installing PDF2RTFService log out and log back in.

Set the Preferences in TextEdit so that a 'new' document will be opened as
Plain Text, not RTF.

Then in Rev:

use the launch command to force your pdf file to open with TextEdit

use do to run this AppleScript:

tell application "TextEdit"
    set tText to the text of document 1
end tell

put the result into myVariable --is now full of your pdf's text :-))))
put char 2 to -2 of myVariable into myVariable --removes AppleScript quotes

you'll probably want to do another 'do' to run this AppleScript to close the
document

tell application "TextEdit"
    close document 1
    --or if your finished with TextEdit
    quit
    --you will be prompted to save if there are any unsaved docs
end tell

Now that should work.



More information about the use-livecode mailing list