رسومات 3DS
Contents
[
Hide
]تصدير تنسيق 3DS إلى PDF
تسمح Aspose.CAD لـ .NET للمطورين بتصدير ملف 3DS إلى تنسيق PDF. يعمل نهج تحويل 3DS إلى PDF على النحو التالي:
- قم بتحميل ملف رسم 3DS باستخدام طريقة المصنع 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.3ds"; | |
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 3DS to PDF | |
string outPath = "output.pdf"; | |
image.Save(outPath, options); | |
} |