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
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:
Whatever value I changed there, the result didn't change at all. Apparently, these lines below basically ignore most of above values.
Once it was changed to extend from
opts, my result start transforming into what I had imagine it to be