How to Generate a PDF document through the lead data?

How to Generate a PDF document through the lead data?

Hi, I want to generate a pdf document through the lead app when I click on a button which I defined in lead app. I want to generate a document with lead data through the custom function.
How is this possible ?

Thanks