| Pdf Function in Joomla |
|
| Written by Administrator |
| Friday, 23 October 2009 10:17 |
How to deactivate pdf function in
Joomla
Joomla has bundled Its pack with the ability to convert
document into pdf file by clicking on the pdf icon when we view the document or by typing the web
address with ending “.pdf’ For
example, If you have a document located at : http://www.yourdomainname.com/file.html You can
generated pdf in joomla by typing the address like this : http://www.yourdomainname.com/file.pdf Sometimes,
this pdf function is frequently utilized by pdf search engines like below :
If someone, named John, is looking for a pdf document on
pdf search engine, and John found it and it links to your web and John clicked
it to access the document, usually the pdf search engine call that pdf document
from your web and show it to John. If you see on the cpanel log of your hosting, it was
accessed by the pdf search engine and it was not accessed by John. The IP
address is belong to the pdf search engine. For web owner, showing pdf documents has several
disadvantages :
Below is the way how to disable the pdf function. Open the
a pdf.php located on the address public_html\libraries\joomla\document\pdf\ Remarks the code in the function render by putting the
sign “//” in front of the code, save it and test it what will happen ? function render( $cache =
false, $params = array()) { // $pdf = &$this->_engine; // Set PDF Metadata // $pdf->SetCreator($this->getGenerator()); // $pdf->SetTitle($this->getTitle()); // $pdf->SetSubject($this->getDescription()); // $pdf->SetKeywords($this->getMetaData('keywords')); // Set PDF Header data // $pdf->setHeaderData('',0,$this->getTitle(),
$this->getHeader()); // Set PDF Header and Footer fonts // $lang =
&JFactory::getLanguage(); // $font =
$lang->getPdfFontName(); // $font = ($font) ? $font :
'freesans'; // $pdf->setRTL($lang->isRTL()); // $pdf->setHeaderFont(array($font,
'', 10)); // $pdf->setFooterFont(array($font,
'', 8)); // Initialize PDF Document // $pdf->AliasNbPages(); // $pdf->AddPage(); // Build the PDF Document string from the document buffer // $this->fixLinks(); // $pdf->WriteHTML($this->getBuffer(),
true); // $data = $pdf->Output('', 'S'); // Set document type headers // parent::render(); //JResponse::setHeader('Content-Length',
strlen($data), true); // JResponse::setHeader('Content-disposition',
'inline; filename="'.$this->getName().'.pdf"', true); //Close and output PDF document // return $data; }
Related Article :
|
| Last Updated on Tuesday, 03 November 2009 15:15 |
List All Products |
|
|
Advanced Search |
|
| Lost Password? | |
| Forgot your username? | |
|
|
|
| Download Area |