jsreport / jsreport-phantom-pdf

jsreport recipe which is rendering pdf from html using phantomjs
GNU Lesser General Public License v3.0
11 stars 8 forks source link

run template to pdf error #16

Closed jdevsean closed 7 years ago

jdevsean commented 7 years ago

hi sir , i already install phantom-pdf . when i create a simple template ,engine is handlebars and recipe is phantom-pdf , is failed . the console's err message is 1489596539 1 and then , i input npm bugs jsreport-server ,the err is 'jsreport-server' is not in the npm registry. please . thanks!

bjrmatos commented 7 years ago

hi! can you upload the full log? you should have a npm-debug.log file in your current working directory with all the logs. also, what OS are you using (linux, windows, osx)?

other question, how are you using jsreport-phantom-pdf? are you installing it manually? just note that if you are using the jsreport package, jsreport-phantom-pdf is installed by default.

jdevsean commented 7 years ago

ok,i use linux OS , i find it that the jsreport-pantom-pdf is already intsll by default . thank, the log is that

npm-debug.txt

thanks!

bjrmatos commented 7 years ago

hmm unfortunately the logs doesn't have any useful information.. can you try to run node server.js and show me what you get in the console?

jdevsean commented 7 years ago

ok !

1489599482 1

jdevsean commented 7 years ago

my template just a very simple template , no script ,no data 1489600102 1

bjrmatos commented 7 years ago

same error with node server, right? hmm could it be a permission issue in linux? i see that you are using /root as your project directory maybe you can try to move the project to another location, probably your home directory and see if you have the same error there.

jdevsean commented 7 years ago

unfortunately , the error still exit , i think that maybe the npm has some problem .

add : in the linux OS , i have root permission , because i run in the vmvare

bjrmatos commented 7 years ago

ok, just note that when using phantomjs on linux you need to install some additionally packages, see this instructions -> https://gist.github.com/julionc/7476620

bjrmatos commented 7 years ago

try to run this:

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev

sudo apt-get install libfreetype6 libfreetype6-dev
sudo apt-get install libfontconfig1 libfontconfig1-dev
jdevsean commented 7 years ago

ok , i will try , but i maybe tell you the result in tommorow , because now is 2.25 in china . thanks for your help!

jdevsean commented 7 years ago

my OS is centOS , some soft install failed;

bjrmatos commented 7 years ago

oh sorry for didn't ask your linux distribution first.. try this: sudo yum install freetype fontconfig

jdevsean commented 7 years ago

hi sir , i run it , the result is already is latest version;

bjrmatos commented 7 years ago

to confirm.. does it work now? can you render pdf without problems?

jdevsean commented 7 years ago

unfortunately , the issue still exit , if i render pdf by wkhtmlpdf , it without any problems.

i remenber that when i install jsreport by command line , stay for a while in the receiving state(the console show "Receiving...") , so i finish it , and install try again,it finish install quickly ,and can work still now , i know there is loss a zip file in my inpression .

bjrmatos commented 7 years ago

hmm ok, you can try reinstalling and if it doesn't work.. can you start jsreport with node server.js, start pdf rendering and send me the result of your console? if there is an error you will have more details now because you won't be using npm start

bjrmatos commented 7 years ago

ah yes, make sure that when installing you have the appropriate permissions because the decompression of the phantomjs zip file can fail because of that, and just for test you can try installing with sudo npm install just to see if there is some kind of permission issue

jdevsean commented 7 years ago

ok ! i will try to reinstalling again , and will note the situation from install to start , if the error still happen , i will give you more detail ! thanks~~

bjrmatos commented 7 years ago

ok, thnks, just a note, i made a mistake the command should be sudo npm install jsreport