FBX Zeichnungen
Contents
[
Hide
]Exportieren des FBX-Formats nach PDF
Aspose.CAD für .NET ermöglicht Entwicklern, eine FBX Datei in das PDF Format zu exportieren. Der Ansatz zur Konvertierung von FBX nach PDF funktioniert wie folgt:
- Laden Sie die FBX Zeichnungsdatei mit der Image.Load Fabrikmethode.
- Erstellen Sie ein Objekt der CadRasterizationOptions Klasse und setzen Sie die Eigenschaften PageHeight und PageWidth.
- Erstellen Sie ein Objekt der PdfOptions Klasse und setzen Sie die Eigenschaft VectorRasterizationOptions.
- Rufen Sie Image.Save auf und übergeben Sie ein Objekt von PdfOptions als zweiten Parameter.
Beispielcode
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); | |
} |