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

Free Support Forum - aspose.com

Convert DWG to PDF

When I convert dwg to pdf, I see the dwg file and the converted pdf file are not the same, any solution?
I attached the converted pdf and the dwg fileScreenshot (294).png (6.2 KB)
0683G000000kxLGQAY.pdf (244.0 KB)


Would you please share original sample DWG file and code snippet that you have used? We will test the scenario in our environment and address it accordingly.

String dataDir = Utils.getDataDir();

	com.aspose.cad.imageoptions.PdfOptions pdfOptions = new com.aspose.cad.imageoptions.PdfOptions();
	com.aspose.cad.Image objImage = com.aspose.cad.Image.load(dataDir + fileId + "." + extension);
	CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions();

	objImage.save(dataDir + fileId.split("\\.")[0] + ".pdf", pdfOptions);

	convertFilesToDelete(fileId, extension);<a class="attachment" href="/uploads/discourse_instance3/74489">PDF Server.zip</a> (52.1 KB)

I moved your question to the CAD forum, And they will provide further support.

1 Like

please, attach your file one more time here, we will look at it.

PDF Server.zip (52.1 KB)

the absense of these objects is expected. They are dynamic dimensions, it appears that the required fields about their structure are missing in file. AutoCAD doesn’t export them to PDF too, other viewers don’t show these entities too.

1 Like