Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phantom 2.0 supported? #39

Open
hawkerboy7 opened this issue Sep 7, 2015 · 5 comments
Open

Phantom 2.0 supported? #39

hawkerboy7 opened this issue Sep 7, 2015 · 5 comments

Comments

@hawkerboy7
Copy link

Hi,

I've used this module before and it worked like a charm.
Now on a new computer I've installed Phanthom.js 2.0.
The module now doesn't seem to work.
Using the example code i get this in my terminal.

Is this correct (because 2.0 is not supported) OR am I doing something wrong?

Thx in advance!

2015-09-07T16:15:30 [DEBUG]      2 arg: "{"viewportSize":{"width":1440,"height":900},"paperSize":{"format":"A4","orientation":"portrait","margin":{"top":"1cm","right":"1cm","bottom":"1cm","left":"1cm"}},"outputQuality":"80","zoomFactor":1,"args":"--debug=true","captureDelay":400}"
2015-09-07T16:15:30 [DEBUG] Phantom - execute: Starting normal mode

2015-09-07T16:15:30 [DEBUG] WebPage - setupFrame ""

2015-09-07T16:15:30 [DEBUG] FileSystem - _open: ":/modules/fs.js" QMap(("mode", QVariant(QString, "r") ) ) 

2015-09-07T16:15:30 [DEBUG] FileSystem - _open: ":/modules/system.js" QMap(("mode", QVariant(QString, "r") ) ) 

2015-09-07T16:15:30 [DEBUG] FileSystem - _open: ":/modules/webpage.js" QMap(("mode", QVariant(QString, "r") ) ) 

TypeError: undefined is not an object (evaluating 'phantom.args.length')

  /path-to-project/node_modules/nodepdf/render.js:11 in global code
@TJkrusinski
Copy link
Owner

Glad to hear usage worked well for ya. I have not tested with phantom 2.0 so I can't speak to compatibility. Looks like it's just the phantom.args object though?

I can take a look at if and how the api changed in the next few days.

@hawkerboy7
Copy link
Author

That would be great!

Thanks in advance! =D

@hawkerboy7
Copy link
Author

I've build the PhantomJS file version 1.9.
So instead of checkout 2.0 you do checkout 1.9.
This version for me works with NodePDF!

@witty-pigeon
Copy link

Created pull request to handle version 2.0+ of PhantomJS

@jozzhart
Copy link

jozzhart commented Nov 23, 2016

Is working for me with release 1.3.0.

@TJkrusinski I suspect this issue can be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants