I am upgrading to ColdFusion 2018. iText routines that I use to convert and rotate PDFs, the pdfReader puts locks on the file that do not release when the page is done.
I have tried adding a close()
method to my code. (It was not needed on the pdfReader in Release 11.)
<cfscript>
reader = createObject("java", "com.lowagie.text.pdf.PdfReader").init( "test.pdf" );
reader.close();
inStream = createObject("java", "java.io.FileReader").init("test2.pdf");
inStream.close();
</cfscript>
I would expect to be able to rename or delete both files when the supplied script is ran, but only the inStream file (test2.pdf
) can be. The reader file (test.pdf
) is locked by the system.