Closed manjilkhambe closed 1 year ago
Normally you would just call close on the reader. Mind adding more code?
Apologies. I should have been more concise. Please refer the code below -
After writer.end(), I want to delete the both files - readerPath & destination. I am able to delete the destination file which is given to writer but the readerPath file, it gives me File busy error. The thing is Muhammara.PDFRStreamForFile has close() method which solves the problem but I don't want to use that. Is there anything which can solve this problem.
you could go this way:
const instream = new muhammara.PDFRStreamForFile(readerPath);
const reader = muhammara.createReader(instream);
.....
instream.close();
// delete here
did this solve your problem?
Yes, this could solve the problem.
Hi, I am reading PDF from physical path using createReader('/some/path'); I am using then reader to file information and creating xobjects from it and copying it in another file using createWriter. Now I want to delete the file but unable to do so, it gives file busy error. Is there a way to release the reader file? like close method in Muhammara.PDFRStreamForFile ?