COLLADA 図面
Contents
[
Hide
]COLLADA形式をPDFにエクスポートする
Aspose.CAD for .NETを使用すると、開発者はCOLLADAファイルをPDF形式にエクスポートできます。COLLADAからPDFへの変換方法は次のとおりです。
- Image.Loadファクトリメソッドを使用してCOLLADA図面ファイルを読み込みます。
- CadRasterizationOptionsクラスのオブジェクトを作成し、PageHeightおよびPageWidthプロパティを設定します。
- PdfOptionsクラスのオブジェクトを作成し、VectorRasterizationOptionsプロパティを設定します。
- Image.Saveを呼び出し、PdfOptionsのオブジェクトを第2パラメーターとして渡します。
サンプルコード
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); | |
} |