Skip to content

Ignored settings due to opts was not extended to ropts #85

@neofreko

Description

@neofreko

I was trying to set some config when initializing this package. But none of my setting was taken into account. I was trying to do this:

var phantom = require('phantom-render-stream')
var pr = phantom({
          format:'pdf',
          orientation: 'portrait',
          paperFormat : 'A4',
          paperSize: {
            width: '5in',
            height: '7in',
            margin: {
              top: '50px',
              left: '20px'
            }
          }
        })

Whatever value I changed there, the result didn't change at all. Apparently, these lines below basically ignore most of above values.

var initialize = function (url) {
      ropts = xtend({
        url        : url,
        quality:opts.quality,
        format     : opts.format,
        printMedia : opts.printMedia,
        expects    : opts.expects,
        timeout    : opts.timeout
      }, ropts);

Once it was changed to extend from opts, my result start transforming into what I had imagine it to be

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions