If I understand your question correctly, you may be looking for the `onfocusout` event. https://www.w3schools.com/jsref/event_onfocusout.asp
Within the listener function, you would search for the parent form and submit it through javascript. It looks like you're trying to do an autosave which seems pretty cool and would make for a great episode as there are many approaches to this.
You would have to also read in the CSV in batches. I believe the memory inflation could partially be due to loading the CSV file into memory. In this example, the CSV file was only about 600KB.
In the HTML, you would wrap the two items in a div tag with a class like `new-page`.
In the PDF's CSS, define the class like
```
.new-page {
page-break-before: always;
}
```
Do you have more information on this? When I hear escrow, I think of home mortgages. Are you looking how to interact with an API or form fill out of a third party website?