Hi!
It’s about pdf export.
On local server everything it’s ok.
When i deploy to other server (files “wkhtmltopdf” with full permission) in Temp folders I find just log file, css file and html file. No pdf file.
Can you help me?
thank you.
Hi!
It’s about pdf export.
On local server everything it’s ok.
When i deploy to other server (files “wkhtmltopdf” with full permission) in Temp folders I find just log file, css file and html file. No pdf file.
Can you help me?
thank you.
This will likely be a permissions issue. This is a duplicate query… Check out this post here: http://www.scriptcase.net/forum/forum/bugs-ab/79137-sc9-pdf-export-does-not-work-for-https
On my 8.1 version it still didn’t work, so I copied the .wkhtmltopdf file from my v9 production environment and uploaded it to my v8.1 system and that seemed to fix it.
I hope this helps.
Hello!
I’m having same problem
directoy _lib is seted with 777
Production environment -> Pdf server Ip is seted with www.domain-name.com [h=1]Not Found[/h] The requested URL /_lib/tmp/sc_pdf_20170905133235_694_grid_asistencias.pdf was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
This is the log:
./wkhtmltopdf-amd64 --page-size Letter --orientation Portrait --header-right “[page]” www.domain-name.com/_lib/tmp/sc_grid_asistencias_html_62j8rt9gactf57u7qft4plffe6.html /home/userxxx/domains/www.domain-name.com/private_html/infosat/_lib/tmp/sc_pdf_20170905133235_694_grid_asistencias.pdf
any solution here, having the same problem and can’t get the permissions right due to an error in the deployed tmp folder
Having the same issue here. On my mac it works fine, but on the production Linux server the pdf is not created. Strange thing is if I create it by hand in Linux as my own user or as root, by copying the command ( ./wkhtmltopdf-amd64 …) from the logfile in _lib/tmp, the pdf is created fine. Checked directory permissions and as advised _lib is on 777 and all files and directories are owned by www-data:www-data. So doesn’t seem to be a permission issue, otherwise it would also not create the pdf also.
I have the same issue. On my mac it works fine but on the production which is CentOS 6 it is not creating the pdf. I have contacted hosting provider and they said they can’t install java in the shared hosting. Not sure if java is required for generating pdf. If this is the case then I have a huge problem in my hand
Did another test:
did a cat of the logfile in _lib/tmp and executed as user www-data by hand:
from _lib/prod/third/wkhtmltopdf/linux-amd64 directory :
sudo -u www-data ./wkhtmltopdf-amd64 --page-size A4 --ori…
I was expecting an error, because if the same is executed by apache I don’t get the PDF, but surprisingly the PDF is created…
_lib and _lib/tmp are both 777 as wel as the file wkhtmltopdf-amd64
In apache log creation of the pdf is logged:
213.46.103.165 - - [15/May/2018:15:23:38 +0200] “GET /crm_admin/grid_vw_documents/grid_vw_documents_gauge_ctrl.php?r=Loys1mo&pbfile=L3Zhci93d3cvYWRtaW4tbGl2ZXRvc2VlYWZyaWNhMDEvY3JtX2FkbWluL19saWIvdG1wL3NjX3BiXzBncDU4OTJrNGkwMmtyNG12aXVvMWFlYjIyLnRtcA%3D%3D&sc_apbgcol=%2Fvar%2Fwww%2FXXXXXXXXXXXXXXX%2Fcrm_admin%2F_lib%2Fcss%2F&str_lang=bmw%3D&str_schema=Sc8_BlueWood%2FSc8_BlueWood HTTP/1.1” 200 265 “https://XXXXXXXXXXXXXXX.com/crm_admin/grid_vw_documents/grid_vw_documents_iframe.php?nmgp_parms=@SC_par@7392@SC_par@grid_vw_documents@SC_par@a43f1a263dbb09e8167c2ffc69dd33a9&sc_tp_pdf=cor&sc_parms_pdf=%20%20--page-size%20A4%20--orientation%20Portrait&sc_create_charts=S&sc_graf_pdf=2&chart_level=” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36”
No errors found in any logfile. So summarized: when creating the pdf using apache it is not created, but when done exactly the same by hand by user www-data the PDF is created. Anyone an idea where to start from here??
Hi Martin, Thanks for the notes Java is not required. Good to know. Also my hosting provider informed me that they are on CentOS 6, I think scriptcase library does not provide the wkhtmltopdf-amd64 for CentOS. Not sure where it get it and also not sure what should be the folder in which it should be kept. Any ideas will help. I also figured out that [SIZE=12px]PDF Server IP, we should be entering domain name and not the IP given by the shared hosting.[/SIZE]
Yes, it is included in scriptcase in: _lib/prod/third/wkhtmltopdf/linux-amd64
Check in _lib/tmp for log files related to your pdf. Are these created?
Yes, log files are created but PDF is not created :). This is the issue. I don’t know why SC has made this so complex. I have sent couple of emails to the support team but no answers :(. They are still lacking on the customer support. I thought linux-amd64 is base linux version and not CentOS. Another question i have
./wkhtmltopdf-amd64 - what is the current path for .? we don’t have any file named wkhtmltopdf-amd64, how does this get executed?
[SIZE=15px]Hi,[/SIZE]
[SIZE=15px]Finally it is working now. This is what I have done. I had copied the Binary from the below location[/SIZE]
[SIZE=15px]https://github.com/h4cc/wkhtmltopdf-amd64/tree/master/bin[/SIZE]
[SIZE=15px]This came as .dmg file. I have renamed the existing file under /public_html/home/_lib/prod/third/wkhtmltopdf/linux-amd64 folder and then copied this file and removed the .dmg extension (by renaming). [/SIZE]
[SIZE=15px]Set 777 rights to this file.[/SIZE]
[SIZE=15px]Now PDF is getting generated perfectly :). Thank you very much for all your help. I would not have nailed down without your hints / help. Appreciate your time. A Big THANK U[/SIZE]
H nnara,
Do you mean the file wkhtmltopdf-amd64 was not in the directory _lib/prod/third/wkhtmltopdf/linux-amd64 ?
In my install the file wkhtmltopdf-amd64 is present in the directory _lib/prod/third/wkhtmltopdf/linux-amd64 and exactly the same as the version of this file on github. Still getting the message
“The requested URL /crm_admin/_lib/tmp/sc_pdf_20180516104805_473_grid_vw_documents.pdf was not found on this server.”
Any suggestions - see my post above from 15 may - 3.37 PM
If you see my reply I have mentioned I have renamed it. So it was existing (I am not sure which version of Linux the default one is, my hosting provider OS is CentOS 6 and hence I had to copy that version and replace it in this l[SIZE=15px]inux-amd64 folder[/SIZE]). In my case also both are same size. But i would suggest to rename your old file and copy the new file and set the permission for that file to 777. This should fix the issue
I tried the same but unfortunately no result… same ‘not found’ message.
Martin,
Can you please share your Production environment settings and the log file that would have got generated after running PDF? Let me see if I can help you; after spending couple of days I think I have a fair idea how to debug this. May be I can make a video and post it in YouTube
Hi Nnara,
Thanks for your offer!
Big difference between my development system is that it runs HTTP on OSX and acceptance and production HTTPS on Ubuntu. On acceptance and production I also have some Apache mods like mod_security, which could be the cause. I’m going to build my development system soon on an new VPS, running Ubuntu and test without https and these mods and see if this could be the cause.
I think it must be somewhere here. Also I cannot export to xls, rtf or any other format which should be possible.
I’ll keep you updated about the results.
Thanks,
Martin
Got it working on my test system. Issue was a http password configured in .htaccess. After removing the password it worked. Did the same on production system, but there still it is not working (difference is php version, migrating prd to a new VPS soon)
All the best
I had the same problem and solved it downloading the latest version wkhtmltopdf file and copy into _lib/prod/third/wkhtmltopdf/amd-386 folder (linux)
Now since last version of sc the page size seems to be changed. What to do ?