Dibujos 3DS
Contents
[
Hide
]Exportando formato 3DS a PDF
Aspose.CAD para .NET permite a los desarrolladores exportar un archivo 3DS al formato PDF. El enfoque de conversión de 3DS a PDF funciona de la siguiente manera:
- Cargue el archivo de dibujo 3DS usando el método de fábrica Image.Load.
- Cree un objeto de la clase CadRasterizationOptions y establezca las propiedades PageHeight y PageWidth.
- Cree un objeto de la clase PdfOptions y establezca la propiedad VectorRasterizationOptions.
- Llame a Image.Save pasando un objeto de PdfOptions como segundo parámetro.
Código de ejemplo
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.3ds"; | |
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 3DS to PDF | |
string outPath = "output.pdf"; | |
image.Save(outPath, options); | |
} |