Open vinodgupta2006 opened 5 years ago
I am also facing the same issue, it is working fine in local but in linux server not working buffer output value gives as a 'undefined'
I am also facing the same issue, it is working fine in local but in linux server not working buffer output value gives as a spawn /var/projects/dev/facommtrack/node_modules/phantomjs-prebuilt/lib/phantom\bin\phantomjs.exe ENOENT
@ganeshpaiya I was faced the same issue, If you update the phantomjs in your server then you may not get this issue.along with that in your server update the below packages too. It was works fine to me now. sudo apt-get install libfreetype6 sudo apt-get install libfontconfig
For alpine it in Dockerfile was works fine
RUN apk add --no-cache curl && \ cd /tmp && curl -Ls https://github.com/dustinblackman/phantomized/releases/download/2.1.1/dockerized-phantomjs.tar.gz | tar xz && \ cp -R lib lib64 / && \ cp -R usr/lib/x86_64-linux-gnu /usr/lib && \ cp -R usr/share /usr/share && \ cp -R etc/fonts /etc && \ curl -k -Ls https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 | tar -jxf - &&\ cp phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs && \ rm -fR phantomjs-2.1.1-linux-x86_64 && \ apk del curl
RUN npm rebuild phantomjs-prebuilt
And don't forgot libconfig
I am generating PDF from HTML and that worked fine on my local machine, which has Windows as OS. But now I deploy my application on a Linux server where it gives weird output:
I have also posted query on stackoverflow: https://stackoverflow.com/questions/53866694/html-pdf-npm-library-gives-weird-output-on-linux-server