CalcBuilder Forum

PDF Download on Chrome Not Working

Usuario satatwork 2015-03-26 04:32:18

Anyone else experiencing an issue downloading the PDF when using Chrome's built in PDF viewer.

I can print, zoom, etc.... but not Save or even right-click and Save As.

When I switch off the built in PDF viewer (and hence use Adobe) it works as expected...but I can't expect all users to do this.

I know it's not just my config as I had a number of other folks try it on their machines and they too couldn't download.

I am running a secure SSL site...not sure if that may have something to do with it.

Any ideas...........?

Edited by satatwork - 26.03.2015 12:31

Moonsoft support 2015-03-26 09:18:35

Hi,
we have tested with a http site and the chrome viewer works as expected. However we have googled about the issue and we've found it's a known bug of chrome and may be related to https:

https://code.google.com/p/chromium/issues/detail?id=224520
https://code.google.com/p/chromium/issues/detail?id=154786

we suggest to upgrade chrome to latest version, for ex we are able to print pdfs from our https moonsoft site using chrome V 41.0.2272.101


Hope this helps, regards

Usuario satatwork 2015-03-26 12:35:13

I too am using 41.0.2272.101

Would you mind testing my calculator at https://www.satisfactionatwork.com/resources/people-problems-cost-calculator

Let me know if you can Save using the icon or the Save-As feature

Trying to see if it is a server (or SSL) config on my end...

Thanks

Moonsoft support 2015-03-26 13:55:45

Hi,
at your site we're not able to save either. To discard if it's a ssl issue or if there is an specific problem with the pdfs created by the library of the calculator we tested also a pdf created with calcbuilder at our site with https, and it also worked fine. It's here in case you want to try

https://www.moonsoft.es/tmp/calcbuilder.pdf

So we think maybe chrome has some problem with the headers sent from your site, we can suggest to play with this file in charge of returning the pdf

joomla\components\com_calcbuilder\views\calcbuilder\view.epdf.php

maybe you can uncomment the line which sets the pdf as an attachment:
JResponse::setHeader('Content-Disposition', 'attachment;......
, maybe it can work better at your site, or ask your hosting about this issue in case they know a valid combination of headers that can work at your server.

Hope this helps, regards

Usuario satatwork 2015-03-26 16:18:01

Update....

Uncommenting the line you referenced now forces the PDF to be downloaded rather than rendered in the chrome browser.

That will definitely do for now until the folks at Google release version 41.

This is a known issue in version 40 and even some large organizations (such as TD Bank in Canada and other companies using SSL websites) are experiencing it.

If I can work out why my server or Joomla config causes the bug to happen in Chrome I will post the solution here.

Moonsoft support 2015-03-26 16:20:18

Great the workaround worked. Thank you very much for the feedback.

Regards

...
CalcBuilder

Create dynamic calculators

Buy now!
...
List Manager

Build different lists for your site

Buy now!