FBX Drawings
Contents
[
Hide
]Exporting FBX Format To PDF
Aspose.CAD for .NET allows developers to export an FBX file to PDF format. FBX to PDF conversion approach works as follows:
- Load FBX drawing file using the Image.Load factory method.
- Create an object of the CadRasterizationOptions class and set the PageHeight & PageWidth properties.
- Create an object of the PdfOptions class and set the VectorRasterizationOptions property.
- Call Image.Save while passing an object of PdfOptions as the second parameter.
Sample Code
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); | |
} |