Yii Framework Forum: Pdf Extension - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Pdf Extension Rate Topic: -----

#1 User is offline   Felix27 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 07-May 12

Posted 11 October 2012 - 08:13 PM

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.yiiframew...ension/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
0

#2 User is offline   bennouna 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,168
  • Joined: 05-January 12
  • Location:Morocco

Posted 11 October 2012 - 08:23 PM

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?
0

#3 User is offline   Felix27 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 07-May 12

Posted 11 October 2012 - 08:32 PM

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

#4 User is offline   Felix27 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 07-May 12

Posted 11 October 2012 - 09:45 PM

View Postbennouna, on 11 October 2012 - 08:23 PM, said:

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?

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?
0

#5 User is offline   bennouna 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,168
  • Joined: 05-January 12
  • Location:Morocco

Posted 12 October 2012 - 02:00 AM

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

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users