Still missing the file extension .PDF

Phoca PDF - creating PDF documents in Joomla! CMS
cyrex
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 15 Apr 2010, 08:22

Still missing the file extension .PDF

Post 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);
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Still missing the file extension .PDF

Post by Jan »

Hi, no ide there, did you check it in different browsers?
If you find Phoca extensions useful, please support the project
cyrex
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 15 Apr 2010, 08:22

Re: Still missing the file extension .PDF

Post by cyrex »

It's fine now with the slightly altered code :). THX for your reply anyway. And a BIG THX for your extensions.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Still missing the file extension .PDF

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
Post Reply