Keyword

pdf extension for k2 items

More
7 years 5 months ago #162397 by Alexis
Replied by Alexis on topic pdf extension for k2 items
Hi Krikor,

In fact, i talked about the message 81173
"(...)
1. place the attached view.pdf.php file to components/com_k2/views/item folder
2. add a piece of code as in attached txt file to your item template (the template you are using for k2) like I used default template which comes with k2 (for mine the path was components/com_k2/templates/default/item.php )
(...)"

I made a view.pdf.php and tried to create a components/com_k2/templates/default/item_pdf.php

At the bottom of view.pdf.php i tried
parent::display($tpl);
and
parent::display('pdf');

Thx

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 5 months ago #162400 by Krikor Boghossian
Replied by Krikor Boghossian on topic pdf extension for k2 items
Unfortunately this is a six year old post which includes a hack to K2's core. I would not recommend this solution.

A 3rd party service (via a button) or a plugin is preferable.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
7 years 5 months ago #162448 by Alexis
Replied by Alexis on topic pdf extension for k2 items
Finally i found the solution.

I added a view.pdf.php in components/com_k2/views/item
...
$this->document->setMimeEncoding('application/pdf');
parent::display('default_pdf');

And added an iten_default_pdf.php in my override.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
7 years 5 months ago #162461 by Krikor Boghossian
Replied by Krikor Boghossian on topic pdf extension for k2 items
Kudos :)
Make sure to keep a backup of your edits.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum