DXB 図面
Contents
[
Hide
]DXB 形式を PDF にエクスポートする
Aspose.CAD for .NET を使用すると、開発者は DXB ファイルを PDF 形式にエクスポートできます。DXB から PDF への変換手順は以下の通りです。
- Image.Load ファクトリメソッドを使用して DXB 図面ファイルを読み込みます。
- CadRasterizationOptions クラスのオブジェクトを作成し、PageHeight および PageWidth プロパティを設定します。
- PdfOptions クラスのオブジェクトを作成し、VectorRasterizationOptions プロパティを設定します。
- Image.Save を呼び出し、2番目のパラメータとして 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.dxb"; | |
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 DXB to PDF | |
string outPath = "output.pdf"; | |
image.Save(outPath, options); | |
} |