Pdf Extension

Hello,

I have added a PDF extension to my YII application, followed the installation instructions. My application allows a user to enter data in a form, upon clicking the submit button a new page reviews the form data. On that page i wish for the user to be able to convert the review to a PDF file upon clicking a link at the bottom of the review. This the extension I used (http://www.yiiframework.com/extension/pdf/#hh4)

My question is, how do i get that link to actually perform the conversion process going through the extension?:mellow:

Thank you in advance

Well you can pass a Yii view to the pdf handler upon certain conditions.

You can assign a special action for that, and your link hrefs that action, or add a test to the existing action on a variable, say, generatePdf, which you would send as true in your link href action.

Sounds familiar?

It does sound familiar, but I’m a bit lost on how to assign an action, could i please get an example?

Hello again, i was able to assign an action in the controller, now i’m having a problem calling the action using HREF, how do i get around that?


echo Chtml::link('Convert to  PDF', array('controller/action', array(generatePDF => true)));