Hello Support team,
I am trying to do DWG to SVG conversion in LInux environment using aspose library, it is failing in LInux environment
From the code I need to do the conversion and as well as get the DWG file version.
Conversion is failing at this line
CadImage cadImage = (CadImage) image;
Here is the required details of the environment.
Amazon Linux 2023.6.20250218
fontconfig version 2.13.94
I am attaching conversion code and conversion logs
Please share your inputs to resolve the issue.
aspose tickets.zip (1.8 KB)
@shivanandtripathi
It appears you are encountering issues with DWG to SVG conversion in a Linux environment using the Aspose library. The error occurs when attempting to cast the image to CadImage. Here are some steps to troubleshoot and potentially resolve the issue:
-
Check Dependencies: Ensure that all necessary dependencies for Aspose.CAD are correctly installed in your Linux environment. Missing libraries can often lead to conversion failures.
-
Font Configuration: Since you are using fontconfig version 2.13.94, verify that the fonts required for rendering the DWG files are properly configured. You may need to install additional fonts or adjust font paths.
-
Review Conversion Logs: Examine the conversion logs for any specific error messages that could provide more insight into the failure. This information can be crucial for diagnosing the issue.
-
Sample Code: If possible, share a minimal version of your conversion code. This can help identify any potential issues in your implementation.
-
Contact Support: If the problem persists, consider reaching out to Aspose support with detailed logs and your environment setup for further assistance.
If you need further clarification or assistance, feel free to ask!
@shivanandtripathi,
Hello,
could you please attach also the initial DWG file so we can try to reproduce the problem directly?
Here I am attaching one sample DWG file
testdwgfile.zip (30.0 KB)
@shivanandtripathi,
thank you for details, we have created CADJAVA-12037 to investigate this issue.
Hello Support,
May I know the updates on this ticket,
Is this issue is happening due to some missing fonts, currently below fonts are installed on the server, please suggest if any new fonts has to be installed for DWG to SVG conversion.
/usr/share/fonts/dejavu-sans-fonts/DejaVuSans-ExtraLight.ttf: DejaVu Sans,DejaVu Sans Light:style=ExtraLight
/usr/share/fonts/dejavu-sans-mono-fonts/DejaVuSansMono-BoldOblique.ttf: DejaVu Sans Mono:style=Bold Oblique
/usr/share/fonts/dejavu-serif-fonts/DejaVuSerifCondensed-Bold.ttf: DejaVu Serif,DejaVu Serif Condensed:style=Condensed Bold,Bold
/usr/share/fonts/google-noto-vf/NotoSans[wght].ttf: Noto Sans:style=Medium
/usr/share/fonts/google-noto-vf/NotoSans[wght].ttf: Noto Sans:style=Regular
/usr/share/fonts/google-noto-vf/NotoSans-Italic[wght].ttf: Noto Sans:style=Italic
/usr/share/fonts/google-noto-vf/NotoSans[wght].ttf: Noto Sans
/usr/share/fonts/dejavu-sans-fonts/DejaVuSansCondensed.ttf: DejaVu Sans,DejaVu Sans Condensed:style=Condensed,Book
/usr/share/fonts/dejavu-sans-fonts/DejaVuSansCondensed-Bold.ttf: DejaVu Sans,DejaVu Sans Condensed:style=Condensed Bold,Bold
/usr/share/fonts/dejavu-serif-fonts/DejaVuSerif-Bold.ttf: DejaVu Serif:style=Bold
/usr/share/fonts/dejavu-sans-fonts/DejaVuSans-Oblique.ttf: DejaVu Sans:style=Oblique
/usr/share/fonts/dejavu-serif-fonts/DejaVuSerifCondensed-BoldItalic.ttf: DejaVu Serif,DejaVu Serif Condensed:style=Condensed Bold Italic,Bold Italic
/usr/share/fonts/google-noto-vf/NotoSans-Italic[wght].ttf: Noto Sans:style=SemiBold Italic
/usr/share/fonts/google-noto-vf/NotoSans-Italic[wght].ttf: Noto Sans
/usr/share/fonts/google-noto-vf/NotoSans[wght].ttf: Noto Sans:style=Bold
/usr/share/fonts/dejavu-sans-fonts/DejaVuSansCondensed-Oblique.ttf: DejaVu Sans,DejaVu Sans Condensed:style=Condensed Oblique,Oblique
/usr/share/fonts/google-noto-vf/NotoSans[wght].ttf: Noto Sans:style=SemiBold
/usr/share/fonts/dejavu-serif-fonts/DejaVuSerifCondensed.ttf: DejaVu Serif,DejaVu Serif Condensed:style=Condensed,Book
/usr/share/fonts/dejavu-serif-fonts/DejaVuSerif-Italic.ttf: DejaVu Serif:style=Italic
/usr/share/fonts/dejavu-sans-fonts/DejaVuSans-Bold.ttf: DejaVu Sans:style=Bold
/usr/share/fonts/dejavu-sans-fonts/DejaVuSans.ttf: DejaVu Sans:style=Regular,Book
/usr/share/fonts/dejavu-sans-fonts/DejaVuSans-BoldOblique.ttf: DejaVu Sans:style=Bold Oblique
/usr/share/fonts/dejavu-sans-mono-fonts/DejaVuSansMono.ttf: DejaVu Sans Mono:style=Regular,Book
/usr/share/fonts/dejavu-sans-fonts/DejaVuSansCondensed-BoldOblique.ttf: DejaVu Sans,DejaVu Sans Condensed:style=Condensed Bold Oblique,Bold Oblique
/usr/share/fonts/dejavu-serif-fonts/DejaVuSerifCondensed-Italic.ttf: DejaVu Serif,DejaVu Serif Condensed:style=Condensed Italic,Italic
/usr/share/fonts/google-noto-vf/NotoSans-Italic[wght].ttf: Noto Sans:style=Medium Italic
/usr/share/fonts/dejavu-serif-fonts/DejaVuSerif.ttf: DejaVu Serif:style=Regular,Book
/usr/share/fonts/dejavu-serif-fonts/DejaVuMathTeXGyre.ttf: DejaVu Serif,DejaVu Math TeX Gyre:style=Regular
/usr/share/fonts/dejavu-serif-fonts/DejaVuSerif-BoldItalic.ttf: DejaVu Serif:style=Bold Italic
/usr/share/fonts/google-noto-vf/NotoSans-Italic[wght].ttf: Noto Sans:style=Bold Italic
/usr/share/fonts/dejavu-sans-mono-fonts/DejaVuSansMono-Oblique.ttf: DejaVu Sans Mono:style=Oblique
/usr/share/fonts/dejavu-sans-mono-fonts/DejaVuSansMono-Bold.ttf: DejaVu Sans Mono:style=Bold
@shivanandtripathi,
Hi,
the issue is pending for the investigation, I will update this thread once I have more information.
@shivanandtripathi,
Hello,
we can not reproduce this issue in our environment. Could you please specify what version of Aspose.CAD you use, could you please try to create simple console application and provide exception details that Aspose.CAD throws? It could be helpful if you can attach this demo project here. The drawing uses Arial Narrow and Lucida Console fonts, could you please try to install them? Could you please also clarify why do you refer to fontconfig and its version, can you see any error relating to it?
Hello support team,
We are using aspose-cad 25.9 version jar file. I have already attached sample code in my initial post.
@shivanandtripathi,
Hi,
we are trying to reduce all side factors that may relate to this failure as we don’t see it directly, your code example works fine for us. That’s why we asked to do simple console project without tomcat, just Aspose.CAD
. There is no information about the exception that Aspose.CAD throws directly, now we can only guess about the possible reasons.