I successfully created a fillable form using PDF-lib (https://www.npmjs.com/package/pdf-lib).
But I am getting following error while flattening it.