You can read more details at: Convert DWG to EMF or WMF in C#
Last active
March 16, 2022 08:18
-
-
Save aspose-com-gists/734b008eb56dc9a014faa20c1437fec1 to your computer and use it in GitHub Desktop.
Convert DWG to EMF or WMF File Programmatically in C# .NET
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string cadFileName = "sample.dwg"; | |
string emfFileName = "sample.emf"; | |
using (Image image = Image.Load(cadFileName)) | |
{ | |
CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions(); | |
rasterizationOptions.PageWidth = 4000; | |
rasterizationOptions.PageHeight = 3000; | |
ImageOptionsBase cadEmfImageOptions = new WmfOptions(); | |
cadEmfImageOptions.VectorRasterizationOptions = rasterizationOptions; | |
// Save output EMF file | |
image.Save(emfFileName, cadEmfImageOptions); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string cadFileName = "sample.dwg"; | |
string wmfFileName = "sample.wmf"; | |
using (Image image = Image.Load(cadFileName)) | |
{ | |
CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions(); | |
rasterizationOptions.PageWidth = 4000; | |
rasterizationOptions.PageHeight = 3000; | |
ImageOptionsBase cadWmfImageOptions = new WmfOptions(); | |
cadWmfImageOptions.VectorRasterizationOptions = rasterizationOptions; | |
// Save output WMF file | |
image.Save(wmfFileName, cadWmfImageOptions); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment