Page 1 of 1

Still missing the file extension .PDF

Posted: 15 Apr 2010, 18:15
by cyrex
Hey folks,

First i'll present my system:
- Joomla 1.515
- Phoca PDF component + plugin
- SEF + SEO turned off
- Set phoca pdf to force download the PDF

Now all is working fine. Phoca produces smooth pdfs and does it pretty quick. BUT i'm still missing the PDF file extension when downloading PDFs.

I only get (default name) Phoca_PDF without any file extension. I know that it should be there since i checked the code in phocapdf.php:

Code: Select all

// Set document type headers
		parent::render();
		JResponse::setHeader('Content-disposition', 'inline; filename="'.$this->getName().'.pdf"', true);
Any suggestions to get this working?

THX

EDIT:

Oh lol never mind ^^ i got it working on my own...
simply changing:

Code: Select all

if ($content->pdf_destination == 'D' || $content->pdf_destination == 'I') {
			$pdf->Output($content->pdf_name, $content->pdf_destination);
			return true;
		}
				
		$data = $pdf->Output($content->pdf_name, $content->pdf_destination);
to:

Code: Select all

if ($content->pdf_destination == 'D' || $content->pdf_destination == 'I') {
			$pdf->Output($content->pdf_name.'.pdf', $content->pdf_destination);
			return true;
		}
				
		$data = $pdf->Output($content->pdf_name.'.pdf', $content->pdf_destination);

Re: Still missing the file extension .PDF

Posted: 15 Apr 2010, 19:09
by Jan
Hi, no ide there, did you check it in different browsers?

Re: Still missing the file extension .PDF

Posted: 15 Apr 2010, 20:13
by cyrex
It's fine now with the slightly altered code :). THX for your reply anyway. And a BIG THX for your extensions.

Re: Still missing the file extension .PDF

Posted: 24 Apr 2010, 22:48
by Jan
Ok