ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

V11 pdf file don't apply css and image


#26

No, i´m using the standard print format without any custom formats. I´ve tried in my different doctypes and al show the same way

this is how it should look


#27

I had a similar problem, the pdf would render correctly if i was on host computer and in browser: localhost:8080. If logged in from other computer on LAN , pdf had the problem. . Changing site_config.json to “host_name”: “http://10.0.2.15”, ( not https , no 443) . fixed it…


#28

you have put host_name under limits. Move it to the root object


#29

This is one thing.
But I did come research on the domain name you provided.
It is configured correctly so if you’re using multitenanted setup then you dont need to specify domain name in the json file.

also always use erpnext from the domain link.
Hopefully Moving hosting name outside limits should solve this issue


#30

What do you mean root? How do i do that can you guide me?


#31

I have some users across multiple computer i dont think that would be a viable option. If


#32

Yeah im using from the domain name and having problem, using the direct ip i cant connect to erpnext


#33

correct you’re using multi tenanted server,
Make sure you have the domain sent to the Static Ip and the site folder name to be the domain name.
There seem to be some configuration issue.


#34

This is what happens when i enter direct with ip


#35

187.32.126.237

This is ur static ip to the server and it will not work direct without the domain name.

This is working correctly as per the concept of Multi Tenant deployment.


#36

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 66, in application
response = frappe.api.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/api.py”, line 56, in handle
return frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 21, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 56, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1026, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/print_format.py”, line 92, in download_pdf
frappe.local.response.filecontent = get_pdf(html)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/pdf.py”, line 23, in get_pdf
pdfkit.from_string(html, fname, options=options or {})
File “/home/frappe/frappe-bench/env/src/pdfkit/pdfkit/api.py”, line 68, in from_string
return r.to_pdf(output_path)
File “/home/frappe/frappe-bench/env/src/pdfkit/pdfkit/pdfkit.py”, line 140, in to_pdf
raise IOError(‘wkhtmltopdf reported an error:\n’ + stderr.decode(‘utf-8’))
IOError: wkhtmltopdf reported an error:
QSslSocket: cannot resolve CRYPTO_num_locks
QSslSocket: cannot resolve CRYPTO_set_id_callback
QSslSocket: cannot resolve CRYPTO_set_locking_callback
QSslSocket: cannot resolve sk_free
QSslSocket: cannot resolve sk_num
QSslSocket: cannot resolve sk_pop_free
QSslSocket: cannot resolve sk_value
QSslSocket: cannot resolve SSL_library_init
QSslSocket: cannot resolve SSL_load_error_strings
QSslSocket: cannot resolve SSLv3_client_method
QSslSocket: cannot resolve SSLv23_client_method
QSslSocket: cannot resolve SSLv3_server_method
QSslSocket: cannot resolve SSLv23_server_method
QSslSocket: cannot resolve X509_STORE_CTX_get_chain
QSslSocket: cannot resolve OPENSSL_add_all_algorithms_noconf
QSslSocket: cannot resolve OPENSSL_add_all_algorithms_conf
QSslSocket: cannot resolve SSLeay
QSslSocket: cannot call unresolved function CRYPTO_num_locks
QSslSocket: cannot call unresolved function CRYPTO_set_id_callback
QSslSocket: cannot call unresolved function CRYPTO_set_locking_callback
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function sk_num
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function SSLv23_client_method
QSslSocket: cannot call unresolved function SSL_library_init
Exit with code 1 due to network error: UnknownNetworkError
QSslSocket: cannot call unresolved function CRYPTO_num_locks
QSslSocket: cannot call unresolved function CRYPTO_set_id_callback
QSslSocket: cannot call unresolved function CRYPTO_set_locking_callback

Now i´m getting this error


#37

I have exact same problem in v11. Wondering when it’s going to be fixed.


#38

anyone?


#39

Im having the same problem on multi-tenant setup


#40

Try installing this:

sudo apt-get install libssl1.0-dev

reference https://github.com/amra/DocumentationAsCode/issues/2


PDF format error
Pdf's not looking nice as html documents (assume CSS missing)
#41

This is the fix!


#42

ok credit where credit is due, I just read gmplab’s post #1 -

In his report on this issue, gmplab already advised of this fix some time ago!


#43

By following the instructions in that post, I was able to resolve this issue…

I installed wkhtmltopdf 0.12.5 using the below:

sudo apt-get install -y software-properties-common &&
sudo apt-add-repository -y “deb http://security.ubuntu.com/ubuntu xenial-security main” &&
sudo apt-get -yq update &&
sudo apt-get install -y libxrender1 libfontconfig1 libx11-dev libjpeg62 libxtst6
fontconfig xfonts-75dpi xfonts-base libpng12-0 &&
wget “https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.xenial_amd64.deb” &&
sudo dpkg -i wkhtmltox_0.12.5-1.xenial_amd64.deb &&
sudo apt-get -f install

Hope it helps everyone else…


#44

Does this have modern css ssupport or it will just help in fixing the standard print format issue?


#45

Some say it fixes all issues, presumably including modern css support. Personally, to this day I still have issues with svg’s when exporting to pdf/batch printing (which is basically batch export to pdf). I never could get a standard bootstrap grid to take, either. Fonts and relative/absolute positioning work, though?

Interesting enough, svg’s work fine when printing single items, so there seems to be some difference between just printing and printing via pdf.