การส่งออก IGES ไปยัง PDF

ส่งออก IGES ไปยัง PDF

Aspose.CAD สำหรับ .NET อนุญาตให้นักพัฒนาสามารถเรนเดอร์ไฟล์ IGES เป็น PDF ได้ ด้านล่างนี้เป็นโค้ดแสดงวิธีเข้าไปยังไฟล์ IGES และแปลงเป็น PDF โดยใช้ CadRasterizationOption และ PdfOptions.

โค้ดตัวอย่าง

// 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);
}