Rasterization with Javascript looks different on Apache server

69 views Asked by At

I am using phantomjs to rasterize an html page that I'm creating dynamically with javascript/php. It looks fine when testing on my localhost, but when testing on an apache server, it appears to blow the image up, causing it to be formatted wrong (extends to two pages instead of one, etc).

Does anyone know how I can stop this from happening?

(Sorry, just created this account and it won't let me post screenshots yet)

2

There are 2 answers

0
jdelong On BEST ANSWER

Found out that the phantomjs binary we were using has issues running on a Linux machine (which is what our server runs on). We were trying to use the MacOS binary on a Linux machine.

6
Brasilikum On

Without further information it is difficult to diagnose. In my Impression you are mixing up things quite a bit. Phantomjs is a headless Browser while Apache is a Server. So my best guess is to check if you zoomed in on the browser you are opening the page on.