Малюнки IGES
Contents
[
Hide
]Експорт IGES в PDF
Aspose.CAD для .NET дозволяє розробникам рендерити файли IGES у PDF. Нижче наведено код, що демонструє, як отримати доступ до файлу IGES і перетворити його в PDF за допомогою CadRasterizationOption та 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
// 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); | |
} |