How do i get an Api that prints invoice once and stores the data in a localStorage?

I am looking for an API that will help me print invoice and store the data in a localStorage.