HTML
JPG
CAD
XML
DWT
PDF
C#を介してDWTをPDFに変換します
AutoCAD®やその他のレンダリングソフトウェアを必要とせずに、DWTをPDFに即座に変換します。
DWTをPDFに変換するために、機能が豊富で強力な Aspose.CAD for .NETAPIを使用します。 C#プラットフォーム用の使いやすいドキュメント操作および変換API。 NuGet パッケージマネージャーを開き、Aspose.CADを検索してインストールします。パッケージマネージャーコンソールから次のコマンドを使用することもできます。
パッケージマネージャーコンソールコマンド
PM> Install-Package Aspose.CAD
C#を介してDWTをPDFに変換する手順
- Image.Loadメソッドを使用してDWTファイルをロードします
- ページの高さと幅でCadRasterizationOptionsのオブジェクトを設定します
- PdfOptionsクラスのインスタンスを作成し、そのVectorRasterizationOptionsプロパティを設定します
- PdfOptionsの結果のファイルパスとオブジェクトを渡しながら、Image.Saveメソッドを呼び出します
変換要件
-Microsoft Windows、または.NET Framework、.NET Core、およびCOM相互運用機能を介したPHP、VBScript、Delphi、C++との互換性のあるOS。 -MicrosoftVisualStudioのような開発環境。 -プロジェクトで参照されているAspose.CADfor.NETDLL。
このサンプルコードは、DWTからPDFへのC#変換を示しています
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
// load DWT in an instance of Image via its Load method | |
using (var image = Image.Load("template.dwt")) | |
{ | |
// create an instance of CadRasterizationOptions and set page height & width | |
var rasterizationOptions = new ImageOptions.CadRasterizationOptions() | |
{ | |
PageWidth = 1600, | |
PageHeight = 1600 | |
}; | |
// create an instance of PdfOptions | |
var options = new ImageOptions.PdfOptions(); | |
// set the VectorRasterizationOptions property as CadRasterizationOptions | |
options.VectorRasterizationOptions = rasterizationOptions; | |
// export DWT to PDF | |
image.Save("output.pdf", options); | |
} |
DWTをPDFに変換する無料アプリ
Check our live demos for DWT to PDF conversion with following benefits.
No need to download or setup anything.
No need to write any code.
Just upload your DWT file and hit the "Convert" button.
You will instantly get the download link for resultant PDF file.