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

Free Support Forum - aspose.com

Chinese can not display right when export to DWG

when I export DWG to PDF use Aspose.CAD some Chinese can’n display . Code like as below:
image.png (40.3 KB)
dwg file is
A3 A4.zip (235.0 KB)


Can you please ensure if the fonts used in your DWG file are actually available on machine where you are performing rendering? Please share the used sample code along with generated output and API version information. Please also try using latest version of Aspose.CAD on your end if you are using older version.

Yes, I am sure that the fonts is in my machine when I open this in AutoCAD environment.

the code pls see below:

License license=new License();
// The path to the resource directory.
String dataDir = Utils.getDataDir(ExportSpecificDWGLayoutToPDF.class) + “DWGDrawings/”;
String srcFile = dataDir + “A3 A4.dwg”;
LoadOptions options =new LoadOptions();
options.setCustomFontFolders(new String[]{“C:\Program Files\Autodesk\AutoCAD 2016\Fonts”});

	CadImage image =(CadImage) Image.load(srcFile,options);

    // Create an instance of CadRasterizationOptions and set its various properties
    CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions();
    // Specify desired layout name
	CadLayoutDictionary layouts = image.getLayouts();

	List <String>lays=new ArrayList<String>();

	Dictionary.Enumerator<String, CadLayout> itr = layouts.iterator();
	while (itr.hasNext())
		KeyValuePair<String, CadLayout> lay = itr.next();

    rasterizationOptions.setLayouts(lays.toArray(new String[0]));

    // Create an instance of PdfOptions
    PdfOptions pdfOptions = new PdfOptions();

    // Set the VectorRasterizationOptions property

    // Export the DWG to PDF
    image.save(dataDir + "A3_A4 ExportSpecificLayoutToPDF_out_.pdf", pdfOptions);

I also try out API version is 20.09 and 20.10.


I have created an issue with ID CADJAVA-919 in our issue tracking system to further investigate the Chinese text rendering issue. We will share the feedback with you as soon as the issue will be fixed.

Fine, if you have any update, please share me .


This issue has just been added in our issue tracking system and is pending for investigation in issues queue. We request for your patience and will share the good new with you as soon as the issue will be fixed.