Hi ,
I have created a database that generate pdf file using NodeJs ,EJS, And mongoose , I setup everything in windows 10 and it will work perfectly,
but while I host my website in AWS EC2 ubuntu server and try to generate pdf file it not work. after troubleshooting I found this error was shown :
"error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory"
try to install again the phantomjs-prebuilt.
while installing the phantomjs-prebuilt package using npm it show the same error .
by searching in google find away to solve this error and able to run and generate pdf file .
using this : sudo apt-get install libfontconfig1
but the css size style was completely change and it show in page my generated pdf file .
you can see:
this is pdf generated in windows while developing:
http://3.16.112.162:8080/asset/open/pdf/GC-%20R112104_%D9%85%D8%AD%D9%85%D9%88%D8%AF.pdf
and this is now while hosting on AWS:
http://3.16.112.162:8080/asset/open/pdf/GC-%20R112114_%D8%B7%D8%A7%D9%87%D8%B1.pdf
all of my font are in locally in the NodeJS public folder .
How can solve this problem ???
Hi , I have created a database that generate pdf file using NodeJs ,EJS, And mongoose , I setup everything in windows 10 and it will work perfectly, but while I host my website in AWS EC2 ubuntu server and try to generate pdf file it not work. after troubleshooting I found this error was shown : "error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory" try to install again the phantomjs-prebuilt. while installing the phantomjs-prebuilt package using npm it show the same error . by searching in google find away to solve this error and able to run and generate pdf file . using this : sudo apt-get install libfontconfig1 but the css size style was completely change and it show in page my generated pdf file . you can see: this is pdf generated in windows while developing: http://3.16.112.162:8080/asset/open/pdf/GC-%20R112104_%D9%85%D8%AD%D9%85%D9%88%D8%AF.pdf and this is now while hosting on AWS: http://3.16.112.162:8080/asset/open/pdf/GC-%20R112114_%D8%B7%D8%A7%D9%87%D8%B1.pdf
all of my font are in locally in the NodeJS public folder . How can solve this problem ???