PDF downloaded without .pdf file extension in Chrome – Phoca PDF 5.2.1 / Joomla 5

Phoca PDF - creating PDF documents in Joomla! CMS
FlorianSch
Phoca Member
Phoca Member
Posts: 10
Joined: 09 Oct 2017, 21:46

PDF downloaded without .pdf file extension in Chrome – Phoca PDF 5.2.1 / Joomla 5

Post by FlorianSch »

Hello Jan,

I am experiencing an issue with Phoca PDF on our Joomla website and would appreciate your advice.

We use Phoca PDF 5.2.1 with Joomla 5.4.x to generate PDF versions of our artist biographies.

Example URL:
https://www.ks-gasteig.de/index.php/de/ ... format=pdf

The issue:
  • In Chrome on macOS, the generated PDF is downloaded without a `.pdf` file extension.
  • If I manually add `.pdf` to the downloaded filename, the file opens correctly as a PDF.
  • In Safari and Firefox, the download appears to work correctly.
  • Another colleague has experienced the same issue.
I have checked the relevant Phoca PDF code. In `libraries/src/Document/PdfDocument.php`, the response header is set as follows:

Factory::getApplication()->setHeader(
'Content-disposition',
'inline; filename="'.$this->getName().'.pdf"',
true
);


The PDF itself is generated through TCPDF in `administrator/components/com_phocapdf/helpers/phocapdfrender.php`.

At this stage, I have not been able to determine whether the issue is caused by the response headers, the interaction with Joomla, or Chrome's handling of the response.

Could you advise how best to diagnose this, and whether this might be a compatibility issue with the current Phoca PDF version?

I have not modified any of the PHP files.

Thank you for your help.

Best regards
Florian