Support team,
I am trying to convert DWG file to DXF using java code. My java code is working fine in WINDOWS but it is failing in Linux environment with below error
“Fontconfig error: No writable cache directories”
Here is the java code snippet.
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
Image image = Image.load(multpartFile.getInputStream());
DxfOptions options = new DxfOptions();
CadRasterizationOptions cadRasterizationOptions=new CadRasterizationOptions();
cadRasterizationOptions.setDrawType(CadDrawTypeMode.UseObjectColor);
options.setVectorRasterizationOptions(cadRasterizationOptions);
options.setOutputMode(CadOutputMode.Convert);
image.save(outputStream,options);
Please provide the inputs to proceed further.
@shivanandtripathi
Can you please provide more details about the environment setup in Linux, such as the version of Fontconfig and any specific configurations you have made?
Here is the required details of the environment.
Amazon Linux 2023.6.20250218
fontconfig version 2.13.94
Please suggest if code changes or configuration changes has to be made to resolve the issue.
@shivanandtripathi,
Hi,
this seems to be related to the user access rights for the work with system fonts.
Hi, Do we have some workaround to resolve this fontconfig error by using java code ?
Please suggest.
@shivanandtripathi,
this seems to be not related to code. Please try to increase user rights. It this will not help it could be useful for us if you create some simple project with this code so we can just run it in the same way as you and observe the error.