Hello,
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/";
//ExStart:ConvertDWGFileToPDF
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();
rasterizationOptions.setBackgroundColor(Color.getWhite());
rasterizationOptions.setPageWidth(1600);
rasterizationOptions.setPageHeight(1600);
// Create an instance of PdfOptions
PdfOptions pdfOptions = new PdfOptions();
// Set the VectorRasterizationOptions property
pdfOptions.setVectorRasterizationOptions(rasterizationOptions);
// Export the DWG to PDF
objImage.save(dataDir + "Bottom_plate_out_.pdf", pdfOptions);
//ExEnd:ConvertDWGFileToPDF
}
}
Thank you in advance for your help.test6.zip (230.4 KB)
Best regards,
ComponentSource
Thomas Moon