In Joomla! 2.5 the PDF feature is not more included. If you want to create PDF documents from your articles, you should install Phoca PDF component and Phoca PDF Content plugin. However, it''s not as easy as it looks. Joomla! 2.5 does not include links to PDF in article views and there is no event which allows you to insert PDF link through some plugin. It means, some of core Joomla! 2.5 content files needs to be edited (using system plugin to find place in Joomla! 2.5 where to insert PDF link was depreciated because of low efficiency).
Download
Download Phoca PDF component from the Phoca PDF download site. You get a ZIP file. Login into your Joomla! administration site and follow these steps:
Go to Extension Manager (Extensions - Extension Manager - Install). You can:
- Upload Package File - select the Phoca PDF component ZIP file from your disc and click onUpload File & Install.
- Install from Directory - you can upload Phoca PDF component ZIP file into your server directory and install it from this directory
- Install from URL - you can install it from another URL.
After the ZIP package will be uploaded you get a screen with follwing options:
Full Install
- Install core Phoca PDF component
- Backup the following core Joomla! content files:
- components/com_content/views/article/tmpl/default.php to components/com_content/views/article/tmpl/default.php.bak
- components/com_content/views/category/tmpl/blog_item.php to components/com_content/views/category/tmpl/blog_item.php.bak
- components/com_content/views/featured/tmpl/default_item.php to components/com_content/views/featured/tmpl/default_item.php.bak
- Copy the following Phoca PDF content and document files:
- from administrator/components/com_phocapdf/files/pdf/pdf.php to libraries/joomla/document/pdf/pdf.php
- from administrator/components/com_phocapdf/files/com_content/views/article/view.pdf.php to components/com_content/views/article/view.pdf.php
- from administrator/components/com_phocapdf/files/com_content/views/article/tmpl/default.php to components/com_content/views/article/tmpl/default.php
- from administrator/components/com_phocapdf/files/com_content/views/category/tmpl/blog_item.php to components/com_content/views/category/tmpl/blog_item.php
- from administrator/components/com_phocapdf/files/com_content/views/featured/tmpl/default_item.php to
components/com_content/views/featured/tmpl/default_item.php
Custom Install
- Install core Phoca PDF component
- Copy the following Phoca PDF document files:
- from administrator/components/com_phocapdf/files/pdf/pdf.php to libraries/joomla/document/pdf/pdf.php
- from administrator/components/com_phocapdf/files/com_content/views/article/view.pdf.php to components/com_content/views/article/view.pdf.php
Customizing Joomla! core content files:
Edit the following file (if your template overrides Joomla! content files, you need to edit this file in your template''s folder):
components/com_content/views/article/tmpl/default.php
line cca 34
FROM:
<?php if ($params->get(''access-edit'') || $params->get(''show_print_icon'') || $params->get(''show_email_icon'')) : ?>
<ul class="actions">
<?php if (!$this->print) : ?>
TO:
<?php$phocaPDF = false;if (JPluginHelper::isEnabled(''phocapdf'', ''content'')) {
include_once(JPATH_ADMINISTRATOR.DS.''components''.DS.''com_phocapdf''.DS.''helpers''.DS.''phocapdf.php'');
$phocaPDF = PhocaPDFHelper::getPhocaPDFContentIcon($this->item, $params);
}?>
<?php if ($params->get(''access-edit'') || $params->get(''show_print_icon'') || $params->get(''show_email_icon'') || $phocaPDF) : ?>
<ul class="actions">
<?php echo $phocaPDF; ?>
<?php if (!$this->print) : ?>
Edit the following files (if your template overrides Joomla! content files, you need to edit these files in your template''s folder):
components/com_content/views/category/tmpl/blog_item.php
components/com_content/views/featured/tmpl/default_item.php
line cca 31
FROM:
<?php if ($params->get(''show_print_icon'') || $params->get(''show_email_icon'') || $canEdit) : ?>
<ul class="actions">
<?php if ($params->get(''show_print_icon'')) : ?>
TO:
<?php$phocaPDF = false;if (JPluginHelper::isEnabled(''phocapdf'', ''content'')) {
include_once(JPATH_ADMINISTRATOR.DS.''components''.DS.''com_phocapdf''.DS.''helpers''.DS.''phocapdf.php'');
$phocaPDF = PhocaPDFHelper::getPhocaPDFContentIcon($this->item, $params);}?>
<?php if ($params->get(''show_print_icon'') || $params->get(''show_email_icon'') || $canEdit || $phocaPDF) : ?>
<ul class="actions">
<?php echo $phocaPDF; ?>
<?php if ($params->get(''show_print_icon'')) : ?>
Upgrade
components/com_content/views/article/tmpl/default.php
is stored in:
templates/your-template/html/com_content/article/default.php
Then the template file needs to be overriden.
Using Joomla! cache system plugin
If Joomla! cache system plugin is enabled on your site, don''t set PDF Destination parameter to value: Inline Browser in Phoca PDF Content Plugin parameters. Use Inline Browser (Popup) instead (which is default). Cache system plugin does not create correct cache file if Inline Browser parameter is set.