FBX図面
Contents
[
Hide
]FBX形式をPDFにエクスポートする
Aspose.CAD for .NET は、開発者が FBX ファイルを PDF 形式にエクスポートできるようにします。 FBX から PDF への変換手法は次のように機能します。
- Image.Load ファクトリメソッドを使用して、FBX 図面ファイルを読み込みます。
- 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.fbx"; | |
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 FBX to PDF | |
string outPath = "output.pdf"; | |
image.Save(outPath, options); | |
} |