In the properties of the datagrid, you can select whether you want to trigger an action on single or double click. Then, select a microflow having the shown entity as input parameter. In that microflow, you can create the PDF based on the selected item.
Hopefully this helps!