- Posts: 5
COMMUNITY FORUM
pdf extension for k2 items
- Pakito Oottoo Pamparampam Crew
-
- Offline
- New Member
Please Log in or Create an account to join the conversation.
- Nilesh Toshniwal
-
Topic Author
- Offline
- New Member
- Posts: 19
Please Log in or Create an account to join the conversation.
- Pakito Oottoo Pamparampam Crew
-
- Offline
- New Member
- Posts: 5
Please Log in or Create an account to join the conversation.
- Pakito Oottoo Pamparampam Crew
-
- Offline
- New Member
- Posts: 5
Kind of... !JRoute::_(''); or something like that... ¿?
Please Log in or Create an account to join the conversation.
- Pakito Oottoo Pamparampam Crew
-
- Offline
- New Member
- Posts: 5
I created a file called pdf.php witch contains the following code:
<?phpif ($_GET) { $dircode = $_GET; $dir = base64_decode($dircode); Header("Location: ".$dir); }else{ echo "Error creando el PDF.";}?>
Then I call this file this way:
<div class="toolbarItem"> <?php $u = $mosConfig_live_site."index.php?option=com_k2&view=item&id=".$this->item->id."&format=pdf&tmpl=component"; $ucode = base64_encode($u); ?> <a class="link" onclick="window.open(this.href,'win2','width=400,height=350,menubar=yes,resizable=yes'); return false;" href="pdf.php?pdf=<?php echo $ucode; ?>"> <img src="images/pdf.png" height="16px"/> PDF </a></div>
Hope this helps someone ;-)
Please Log in or Create an account to join the conversation.
- Marcos Peebles
-
- Offline
- New Member
- Posts: 5
Even better than just a single pdf page, worth looking!Cheers
Please Log in or Create an account to join the conversation.
- Pakito Oottoo Pamparampam Crew
-
- Offline
- New Member
- Posts: 5
Marcos Peebles said:
Hi all, Philip Locke as come out with this:http://www.content2pdf.com/
Even better than just a single pdf page, worth looking!Cheers
Please Log in or Create an account to join the conversation.
- b600 e6tr
-
- Offline
- New Member
- Posts: 2
Thanks
b600
Please Log in or Create an account to join the conversation.
- b600 e6tr
-
- Offline
- New Member
- Posts: 2
Can you please help with this. I am not able to generate the k2-item as pdf. This would be great help to me if you suggest me the steps.
Ruth Cheesley wrote: This looks great, I've got it working but it's not showing tables properly so may have to have a twiddle, also not showing the image.
Good start, I can't believe it's not a core part of K2 to be honest!
Ruth
Please Log in or Create an account to join the conversation.
- rosa qwe
-
- Offline
- New Member
- Posts: 4
but not exist !! :( :( :( :( :( :( :(
please help me .
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Why don't you try a service like www.printfriendly.com/button?
You can c/p the snippet in your item.php.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- rosa qwe
-
- Offline
- New Member
- Posts: 4
but i need pdf Button for save item text & img in user(visitor) computer !
i wating to your answer ....
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
That what this button does, it prints the page to a .pdf file on your PC.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Marcio
-
- Offline
- New Member
- Posts: 2
I got the view.pdf file, but the txt code is not available for download.
Do you have it, or meanwhile since this years have found another good solution for the PDF button in K2?
Thanks
Please Log in or Create an account to join the conversation.
- Pero Mero
-
- Offline
- New Member
- Posts: 8
Krikor Boghossian wrote: Hello qwe,
Why don't you try a service like www.printfriendly.com/button?
You can c/p the snippet in your item.php.
Ok I have code
<script>var pfHeaderImgUrl = '';var pfHeaderTagline = '';var pfdisableClickToDel = 0;var pfHideImages = 0;var pfImageDisplayStyle = 'none';var pfDisablePDF = 0;var pfDisableEmail = 0;var pfDisablePrint = 0;var pfCustomCSS = '';var pfBtVersion='1';(function(){var js, pf;pf = document.createElement('script');pf.type = 'text/javascript';if('https:' == document.location.protocol){js='pf-cdn.printfriendly.com/ssl/main.js'}else{js='http://cdn.printfriendly.com/printfriendly.js'}pf.src=js;document.getElementsByTagName('head')[0].appendChild(pf)})();</script><a href="www.printfriendly.com" style="color:#6D9F00;text-decoration:none;" class="printfriendly" onclick="window.print();return false;" title="Printer Friendly and PDF">
and I wish to put that code in item.php which is located in joomla 3.2.2 -
public_html/templates/ja_mero/html/com_k2/templates/ja_mero/item.php
Where in file to paste that code? I try to paste everywhere but nothing happend
Thank you for your answer
Please Log in or Create an account to join the conversation.
- Pero Mero
-
- Offline
- New Member
- Posts: 8
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Moderator
- Posts: 8743
This is up to you. Since you are using a custom script you need to check that your page doesn't have any javascript errors and that the button is displayed.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Yannick Lämmel
-
- Offline
- New Member
- Posts: 14
I found a Voting for a Wishlist with Phoca-PDF-functions
I really like to post ist here, because it would make K2 & Phoca very much better!!!
phoca.uservoice.com/forums/12726-phoca-pdf/filters/hot
Please Log in or Create an account to join the conversation.
- Alexis
-
- Offline
- New Member
- Posts: 4
I'm in the same situation and need to generate a pdf from a k2 item with tcpdf.
Where can i find your examples as view.pdf.php
Thx
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
This would require custom coding.
An alternative would be www.printfriendly.com/button
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.