Create custom action menu btn in detailview

Hello everyone ;
I want to know how can i create custom action menu btn in detailview , which allows to open a new window, a pdf file

Thank u for ur help