gofpdf
gofpdf copied to clipboard
Closing files
So I've encountered a problem when using gofpdf library. When importing pages when it reads the file it does not close it. Then I found out that the library can't close it cause it does not have the access to the file opened by this lib. Far as I see that files opened in NewPdfReader and NewPdfWriter cannot be closed outside the lib. So when the libs use the reader and writer the files remain open and cannot be closed. So there should be a public function on pdfReader and pdfWriter that just closes the file. Something like this maybe?
Did I miss understood how something in the library works? Or am I right and if so should I make a PR with the methods that you see in the screenshot or is it simple enough for you to do a quick implementation. Btw the method in the screenshot was not tested just wanted to see how it would be implemented.