Hi Dinesh,
Thank you for sharing the details. Based on the exception information, we found that the issue occurs because the stream is being closed before it is loaded into the PDF document. We kindly request you to ensure that the stream is not closed before loading the PDF document.
Additionally, the provided code is not runnable on our end. As a result, we are unable to create a workable version of the code or replicate the problem. If you continue to face issues after verifying the stream disposal, please provide the following details to help us investigate further:
- The complete stack trace of the exception.
- A runnable sample that replicates the issue on our end.
This will enable us to identify and address the problem effectively.
Regards,
Irfana J