رسومات COLLADA
Contents
[
Hide
]تصدير تنسيق COLLADA إلى PDF
تسمح Aspose.CAD لـ .NET للمطورين بتصدير ملف COLLADA إلى تنسيق PDF. تعمل طريقة تحويل COLLADA إلى PDF كما يلي:
- قم بتحميل ملف رسم COLLADA باستخدام طريقة المصنع Image.Load.
- أنشئ كائنًا من فئة CadRasterizationOptions واضبط خصائص PageHeight و PageWidth.
- أنشئ كائنًا من فئة PdfOptions واضبط خاصية VectorRasterizationOptions.
- قم باستدعاء Image.Save مع تمرير كائن من PdfOptions كمعامل ثانٍ.
عينة من الكود
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 inputFile ="file.dae"; | |
using (Image image = Image.Load(inputFile)) | |
{ | |
// Initialize PdfOptions class object | |
PdfOptions options = new PdfOptions(); | |
CadRasterizationOptions cadRasterizationOptions = new CadRasterizationOptions(); | |
cadRasterizationOptions.PageHeight = 500; | |
cadRasterizationOptions.PageWidth = 500; | |
options.VectorRasterizationOptions = cadRasterizationOptions; | |
// Export COLLADA to PDF | |
string outPath = "output.pdf"; | |
image.Save(outPath, options); | |
} |