filename truncated by ,"

Phoca PDF - creating PDF documents in Joomla! CMS
gumibear
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 02 Apr 2019, 18:47

filename truncated by ,"

Post by gumibear » 15 Oct 2019, 23:17

Hi,

I have phoca pdf set to inline browser (popup). If we have a title like "Radiohead announces "OK Computer," Releases in August.", the download filename is truncated to something like "Radiohead announces _OK Computer

SO the rest of the filename is missing as well as the filename extension .pdf.

When I change the filename extension to pdf and look at the properties of the pdf, I see that the title of the document is correct.

Does anyone know how I can fix this?

Thanks

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 41746
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: filename truncated by ,"

Post by Jan » 16 Oct 2019, 14:23

Hi, hmmm, this seems like browser feature.

When I use Google Chrome, I get:
Radiohead announces _OK Computer_, Releases in August.
When I use Firefox, I get:
Radiohead announces
only.

Image
If you find Phoca extensions useful, please support the project

gumibear
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 02 Apr 2019, 18:47

Re: filename truncated by ,"

Post by gumibear » 16 Oct 2019, 16:10

Hi Jan,
Thanks for the reply. I did not know Firefox had any issue.

On Chrome, you're right, there is no problem if it's ",
the problem occurs when it's ,"

that is the comma before the quote

I was trying to find the place in the code where I could just try to strip the comma's from the title but had no luck in finding the right place. There was code I found that I could strip the commas from the titles, but when generating the pdf, the comma still was there and therefore, the problem occurred.

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 41746
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: filename truncated by ,"

Post by Jan » 21 Oct 2019, 15:50

Hi, see this file:
plugins\phocapdf\content\content.php

$document->getTitle() function, there you can apply the str_replace, e.g.

Jan
If you find Phoca extensions useful, please support the project

Post Reply