Free Support Forum -

Delay PDF converting time for Aspose.CAD for Java


I have a customer in Japan who is currently evaluating Aspose.CAD for Java and have sent us question.
Can you please answer their questions?

There will take many time (3 seconds to dwg load and 21 seconds to image save ) to convert to PDF from a dwg file.
I have attached the dwg file.

How can I speed up the PDF conversion time?

Windows 10 64bit: Intel Core i7-8550U
Memory: 16GB
Jave version: 1.8.0_60

Here is the my reference sample source:

public class ConvertDWGFileToPDF {

public static void main(String[] args) {
// The path to the resource directory.
String dataDir = Utils.getDataDir(ConvertDWGFileToPDF.class) + "DWGDrawings/";
                String srcFile = dataDir + "Bottom_plate.dwg";

 com.aspose.cad.Image objImage = com.aspose.cad.Image.load(srcFile);

                // Create an instance of CadRasterizationOptions and set its various properties

CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions();


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

                // Set the VectorRasterizationOptions property

                // Export the DWG to PDF
       + "Bottom_plate_out_.pdf", pdfOptions);




Thank you in advance for your (230.4 KB)

Best regards,

Thomas Moon


I have worked with the sample file and total rendering time is 18 seconds from loading till rendering. This is pretty normal time as rendering take place in memory and time is required by API for saving to PDF.

image.png (451.9 KB)


Thank you for your help.

Can you plase confimr customer feedback and addaitional below?

I understood but do you have any idea to speed up the PDF conversion?

Also, I have additional quistion.
Korean characters(Font name:GHS.SHX) will be garbled when converted to dwg to pdf from dwg.(Plase see attached image)
Can you plase tell me how to set Korean character?

Best regards,

Thomas MoonKorean_characters.png (47.8 KB)


In the sample code that you have shared earlier, you are already using the minimum rasterization settings. One thing that you can further do is to reduce the page width and height. However, as I said earlier that the time taken is fair enough for the shared file to render.

At present, Aspose.CAD does not support .SHX fonts. All SHX font are replaced with default TTF font on the machine where rendering is done. So, you can override style font but only with TTF font.
Also, you can specify a font path if it differs from the system default path, for example:

String customFonts = "C:\\CustomFonts\\x.d";
LoadOptions loadOptions = new LoadOptions();
loadOptions.setCustomFontFolders( new String[] { customFonts } );
loadOptions.setCustomFontFolderOptions( CustomFontFolderOptions.AddFolderForAll );
CadImage cadImage = (CadImage)Image.load(fileName, loadOptions);
for (Object style : cadImage.getStyles()) {

//Perform rendering  now