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)

@operationsdotbcs

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();
	rasterizationOptions.setPageWidth(10);
	rasterizationOptions.setPageHeight(10);
	pdfOptions.setVectorRasterizationOptions(rasterizationOptions);

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

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

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

1 Like

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

PDF Server.zip (52.1 KB)

@operationsdotbcs,
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