Bản vẽ IGES

Xuất IGES sang PDF

Aspose.CAD cho .NET cho phép các nhà phát triển chuyển đổi các tệp IGES sang PDF. Dưới đây là mã minh họa cách truy cập tệp IGES và chuyển đổi nó sang PDF bằng CadRasterizationOption và PdfOptions.

Mẫu mã

// The path to the documents directory.
string MyDir = RunExamples.GetDataDir_IGESDrawings();
string sourceFilePath = MyDir + "figa2.igs";
using (Image cadImage = Image.Load(sourceFilePath))
{
CadRasterizationOptions options = new CadRasterizationOptions
{
PageHeight = 1000,
PageWidth = 1000,
};
PdfOptions pdfOptions = new PdfOptions();
pdfOptions.VectorRasterizationOptions = options;
cadImage.Save(MyDir+ "figa2.pdf", pdfOptions);
}