Closed abenhamdine closed 6 years ago
I eventually managed to make the config work by passing the config in json :
margin: '{"top": "25px","left": "1cm","right": "1cm","bottom": "5px"}'
It would be a good thing to update the docs accordingly.
PR sent for the docs : #30
Thank you for full description.
I think both string and json should be supported. It is likely rather a bug in validation. @bjrmatos can you confirm?
thanks @abenhamdine for the description of the problem
I think both string and json should be supported. It is likely rather a bug in validation. @bjrmatos can you confirm?
yes, object type was missing in validation, this is now fixed with these changes and available in new version 2.1.1
Hi and thx for this useful module.
I just upgraded to jsreport with the following updates :
With version 1.x, I was passing margin configuration as an object and it used to work :
(see https://github.com/jsreport/jsreport-phantom-pdf/pull/17 for this possibility)
but with version 2.x, It's seems no more possible to pass a string, I'm getting a validation error :
I don't understand why. Edm type line https://github.com/jsreport/jsreport-phantom-pdf/blob/bf7768ede54aeba9b1f0dc05e0ff66a5c48f58cb/lib/phantom.js#L30 seems inconsistant with code line https://github.com/jsreport/jsreport-phantom-pdf/blob/bf7768ede54aeba9b1f0dc05e0ff66a5c48f58cb/lib/phantom.js#L131
but it was already the case in version 1.x
Thx by advance.