We're sorry GroupDocs doesn't work properply without JavaScript enabled.

Free Support Forum - groupdocs.com

ConverterSettings Cache implementations throws exception

If I set any ICache implementations other than NullCache, I get an exception during the conversion process. I’ve tried other internal cache implementations (MemoryCache and FileCache) and get the same exception.

I’ve also tried to run the example from the Github repo (“UseCacheWhenProcessingDocuments”) and it has the same behavior. https://docs.groupdocs.com/conversion/java/how-to-use-custom-cache-implementation/

This is using groupdocs-conversion version 22.3 (latest).

om.groupdocs.conversion.exceptions.GroupDocsConversionException: Type Name = AutoResetEvent, FullName = com.groupdocs.conversion.internal.c.a.ms.System.Threading.AutoResetEvent is not marked as Serializable.

// HTML to PDF conversion (same behavior for image to PDF)
// CustomCache extends MemoryCache with delegates only.
final LoadOptions loadOptions = getLoadOptions(file);
final ConvertOptions<?> convertOptions = getConvertOptions(extension);
final ConverterSettings settings = new ConverterSettings();
settings.setCache(new CustomCache());

final ByteArrayOutputStream output = new ByteArrayOutputStream();
final Converter converter = new Converter(file.getInputStream(), loadOptions, settings);

converter.convert(output, convertOptions);
return output.toByteArray();


This issue is reproduced at our end. Therefore, we’ve logged it in our internal issue tracking system with ID CONVERSIONJAVA-1676.
You’ll be notified in case of any update.

1 Like