Skip to end of metadata
Go to start of metadata

Due to an unfortunate bug in Java’s implementation of memory-mapped files (view JDK bug entry), it is possible that a PDF file opened and processed by PDFTextStream will remain locked even after the PDFTextStream instance’s close() function has been called, and PDFTextStream has released all of the filesystem handles it has allocated. This locking behaviour (which is known to occur only on Windows) will prevent the PDF file from being deleted or moved until Java’s garbage collector eliminates certain JDK-internal objects that are used to track and manage the previously memory-mapped PDF file.

The solution in this case is to force PDFTextStream to not memory map source PDF files. This is done by setting the pdfts.mmap.enable system property to N, or by setting the memory mapping property in com.snowtide.pdf.PDFTextStreamConfig to false. For details on how to set system properties for PDFTextStream, please refer to the appropriate appendix in the Developer's Guide (available in all PDFTextStream downloads, or here).

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.