       document.getElementById('demo').getBoundingClientRect()
   page.render(output)
   phantom.exit()
-
-

else
  options = {}



# ---------------------------------------------------------------------



margin = options['margin'] || 0
border = options['border'] || 0

  else
    null

# ---------------------------------------------------------------------

page = require('webpage').create()
page.settings.userAgent = options['user_agent'] if user_agent
page.customHeaders = { 'Referer': options['referer'] } if referer

# ---------------------------------------------------------------------

if output.substr(-4) is ".pdf"
  if paper_size != undefined
