peerigon / phridge

A bridge between node and PhantomJS
The Unlicense
519 stars 50 forks source link

Footer contents (reference to phantom.callback) not working #29

Closed jasonnathan closed 9 years ago

jasonnathan commented 9 years ago

Hi, inside my run function, I define the `page.paperSize' property like this:

        page.paperSize = {
            format: 'A4',
            orientation: 'potrait',
            border: {
              top:"1in",
              bottom:".25in",
              left:"1.2in",
              right:"1.2in"
            },
            footer: {
               height: '.5in',
               contents: phantom.callback(function(pageNum, numPages) {
                  return "Page " + pageNum + " of " + numPages;
              })
            }
        }

But for some reason, the footer never gets rendered. Is there a way I can debug this?

jasonnathan commented 9 years ago

Sorry, it worked perfectly, I was setting it's height wrong.