Using applescript to get PDF's preview

Is there a way using xcode applescript to get a PDF’s preview and use it for my tableview image cell? I have seen 3rd party apps that will get previews from files, but I would like to do this without 3rd party apps. I have to believe that using unix there is a way to get the resources necessary.

Thanks.