KnpLabs / snappy

PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page. Wrapper for wkhtmltopdf/wkhtmltoimage

Home Page:https://knplabs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

buildCommand method of generator outputs float values locale-aware

finwe opened this issue · comments

In an environment with cs_CZ locale, arguments of the command are being output as locale aware, which is a problem with decimal page margins:

$options = [
	'margin-top'    => 25.4,
	'margin-right'  => 19.1,
	'margin-bottom' => 25.4,
	'margin-left'   => 19.1,
];

becomes

 --margin-bottom '25,4' --margin-left '19,1' --margin-right '19,1' --margin-top '25,4'

Yes, the values can be specified as strings, it would still be nice if this was handled internally.

Hello,
Would you mind opening a PR for that?