set a pdf file as NSButton's image

0 down vote favorite

i want to set a pdf file as a NSButton's image, and when i clicked the button,the button's color changed, just like the xcode's navigator editor. can some one tell me how to do this? thanks in advance

图片说明

just refer these two answers
http://stackoverflow.com/questions/4107850/how-can-i-programatically-generate-a-thumbnail-of-a-pdf-with-the-iphone-sdk
http://stackoverflow.com/questions/5658993/creating-pdf-thumbnail-in-iphone