Free Support Forum -

Errors and file not being let go

I have run into a problem where I am filling the pdf form with values and if I get an error within the try catch block then when I try to fill the pdf form again I get an error that says “File is in use”. I’ve tried setting the form=nothing after the catch but it doesn’t let me. How can I let the file go after an error.

Dear customer,

I guess you may have some errors in filling the form. Note that you must use Form.Save() after filling the form and if you use FileStream as the parameter, you should close it by yourself.

The simple and complete sample is

Any other question is welcome.

Best regards.