You need to point your link to a servlet and pass the necessary information and have the servlet create the pdf.
A portlet won't work for creating a pdf, excel doc, csv etc... because the portal content will have already been drawn to the view before the portlet content is created.
i can't create a servlet in my JSR Project, can you tell me, how can'i use a servlet please.
By your comment, I assume that you are using some kind of IDE. Don't you just love it when the IDE thinks it knows better than you do and prevents you from using certain tools? But you can outsmart it - create a plain old class and have the class extend the javax.servlet.http.HttpServlet class.