I am trying to create an Invoice design using SVG and Handlebar.
The process is as follows:
First I have created invoice design in Inkscape (.svg format) and used handlebar template for dynamic values.
Here is the ajax:
zubizi.getSalesById(id).then(function (sales_details) {
$.ajax({
url: '/assets/img/print.svg',
dataType: 'text',
success: function (data) {
var bill = Handlebars.compile(data);
console.log(zubizi.settings);
$('#print-placeholder').html(bill(sales_details));
}
});
});
Here is the output:
It is working but, the items of the invoice are overlapping
How can I change the Y value of the object inside that handlebar each loop??
Can I use external objects or set the Y values dynamic?? How??
Any ideas would be appreciated.