Document is closed error while using kio4 pdf extension

Yes, i don’t think so your logic is correct better go through with this guide, surely you will correct it