Open pilezkiy opened 1 year ago
When set float scale like 2.9459 in options of convertFile puppeteer throw error
Invalid parameters Failed to deserialize params.width - BINDINGS: int32 value expected
In file /convert-svg-core/src/Converter.js:298 must to fix like: if (options.scale !== 1) { dimensions.height *= options.scale; dimensions.height = Math.ceil(dimensions.height); dimensions.width *= options.scale; dimensions.width = Math.ceil(dimensions.width); await this[_setDimensions](page, dimensions); }
if (options.scale !== 1) { dimensions.height *= options.scale; dimensions.height = Math.ceil(dimensions.height); dimensions.width *= options.scale; dimensions.width = Math.ceil(dimensions.width); await this[_setDimensions](page, dimensions); }
After that all works.
When set float scale like 2.9459 in options of convertFile puppeteer throw error
In file /convert-svg-core/src/Converter.js:298 must to fix like:
if (options.scale !== 1) { dimensions.height *= options.scale; dimensions.height = Math.ceil(dimensions.height); dimensions.width *= options.scale; dimensions.width = Math.ceil(dimensions.width); await this[_setDimensions](page, dimensions); }
After that all works.