number_format smarty not working in pdf template

Hi All,

               In my pdf template i need to thousand separate my amount values.

I use the below code 

$quantity+$totaltax|number_format:2:".":","

But i get the below error in logs and my pdf doesnt print

Smarty error: [in cache/modules/PdfManager/tpls/13b4f8fe-7cf3-11e7-8952-fa163e8c8e90.tpl line 138]: [plugin] (secure mode) modifier 'number_format' is not allowed (Smarty_Compiler.class.php, line 1929)

Are there alternate ways to do the thousand separator with smarty.

Regards

Sidhu André Lopes Francesca Shiekh