Link Search Menu Expand Document

getTotalLines - Javascript-Snippets

PDF from HTML Template sample in Javascript-Snippets demonstrating ‘getTotalLines’

<code>getTotalLines</code> calculates the total cost of a list of items based on their quantity and price.
Inserts getTotalLines that you can use like this: <code>${{getTotalLines items}}</code>
Handlebars.registerHelper('getTotalLines', function (items) {
    var total = 0;
    items.forEach(function (line) {
    total += line.quantity * line.price;
    return total;
}); Web API: the Web API with a set of tools for documents manipulation, data conversion, data extraction, splitting and merging of documents. Includes image recognition, built-in OCR, barcode generation and barcode decoders to decode bar codes from scans, pictures and pdf.

Get your API key here!

Download Source Code (.zip)

return to the previous page explore PDF from HTML Template endpoint