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

V11 pdf file don't apply css and image


#1

The pdf preview works well.
But when I export the pdf file, the css and images displayed wrong.
he official v11 beta also have this issue.



#2

@gmplab
May be It’s not loading boostrap css and JQuery in website context.

Because Print Format used Bootstrap Row&Column html style to generate the pdf template.


#3

#4

Same problem here!


#5

Can someone test this PR, and see if it fixes the problem? https://github.com/frappe/frappe/pull/6559


#6

Hello!

I´m still having this issue, i´m using v11 in production mode along with lets encrypt
How do i solve this problem?

Bench Manager: v0.0.1 (develop)

ERPNext: v11.1.11 (master)

Frappe Framework: v11.1.11 (master)

I edited my json and put the domain

“host_name”: “https://mydomain.com”,
“http_port”: 443,

and still wasn´t able to get this working,


#7

Have you tried setting the hostname to the ip of the ERPNext host?
“host_name”: “192.168.1.xxx”,


#8

Yes! still having problems
i used localhost, my domain, internal ip and updated wkhtmltopdf and it didn´t work but


#9

I’m too getting same problem, css not loading for the pdf reports , because of this alignment not perfect, font is looking like dottedmatix print, wkhtmltopdf 0.12.5(with patched qt) updated everything, still not able find proper solution, please help me out from this problem.


#10

Well this issue is in v10 too.

I have custom print format with heavy css design pdf never worked properly and we have to use print button and then save as pdf.

This is from wkhtmltopdf. Can we not upgrade to xhtml2pdf instead, as xhtml2pdf claims to have support for modern css.

If anyone can confirm that will help then we can look into this and try to push a pr.

Edit : weazyprint is another option but on python 3.4


#11

I´m not using custom print format or anything and i´m having this problem, i did a fresh install with production and develop branch both showing the same thing, anyone have any clues of how to solve this?


#12

Can you share screenshot of the json file?

Looks like the host have name issue to me.


#13

{
“db_name”: “XXXXXXXXXXXXXX”,
“db_password”: “XXXXXXXXXXXXXXX”,
“encryption_key”: “XXXXXXXXXXXXXX”,
“limits”: {
“space_usage”: {
“backup_size”: 480.0,
“database_size”: 419.42,
“files_size”: 332.0,
“total”: 1231.42,
“host_name”: “erp.atriobusiness.com.br”,
“http_port”: 443
}
},
“ssl_certificate”: “/etc/letsencrypt/live/erp.atriobusiness.com.br/fullchain.pem”,
“ssl_certificate_key”: “/etc/letsencrypt/live/erp.atriobusiness.com.br/privkey.pem”
}


#14

What is the name of the site folder?


#15

erp.atriobusiness.com.br


#16

Try this? “host_name”: “http://erp.atriobusiness.com.br”,


#17

I´ve tried, same result: tests that i did:
“host_name”: “erp.atriobusiness.com.br”,
“host_name”: “https://erp.atriobusiness.com.br”,
“host_name”: “http://erp.atriobusiness.com.br”,
“host_name”: “https://localhost”,
“host_name”: “http://localhost”,
“host_name”: “127.0.0.1”,
“host_name”: “10.20.30.5”,
“host_name”: “https://10.20.30.5”,


#18

Did you do bench restart and nginx reload after trying each host name?


#19

no! i´ll try that now


#20

Now i did and no success