نقاشیهای 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); | |
} |