3DS Drawings
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); | |
} |