PDF contents in Javascript actions

I use Contents Contain as a matching criteria for several rules. I'd like to be able to access the text contents of pdf in a run Javascript action - am I missing something? I can't seem to figure out how to set one of the inputAttributes to the contents of a pdf. If I can do that, I can use some JS Regexes to identify and generate an output variable with a new file_name.