Javascript library that automatically splits html invoices with many line items into multiple pages