Free Support Forum - groupdocs.com

Output file still in use after document conversion using Java

Java version 19.10.
The process cannot access the file. Because it is being used by another process.
Will this be fixed in later versions?


This Topic is created by atirtahir3 using Email to Topic tool.

1 Like

@RalfScania,

Can you please share a simple application (without any third party references/dependencies) using that issue could be reproduced. Because we cannot reproduce this issue using this example project.

ConvertedDocument convertedDocument = conversionHandler.convert(inputStream, filename, saveOption);
convertedDocument.save(sourceFileName);
byte[] convertedByteArray = Files. readAllBytes (Paths. get (sourceFileName));
convertedDocument.dispose();
deleteTempFile(Paths. get (sourceFileName));

And this is the delete method:

private void deleteTempFile(Path path){
try {
Files.delete(path);
} catch (Exception e) {
logger.info(“Delete File {} conversion error. {}”, path.getFileName(), e.getMessage());
}
}

1 Like

@RalfScania,

We are now investigating this issue. Your investigation ticket ID is CONVERSIONJAVA-856. As there is any update, you’ll be notified.

@RalfScania,

We have an update on CONVERSIONJAVA-856. This issue will be fixed in some upcoming releases of the API (Probably in February). As release gets on-board, we’ll notify you.

@RalfScania,

Your reported issue CONVERSIONJAVA-856 is now fixed in API version 20.2.