Hello,
I’m tring to convert dxf file into pdf.
The dxf contains layers which is not converted into the pdf file.
TCAD.projectsLayerse.zip (653 Bytes)
output56318438.pdf (19.1 KB)
This is my code:
using (var image = ((Aspose.CAD.FileFormats.Cad.CadImage)Aspose.CAD.Image.Load("TCAD.projectsLayerse.dxf")))`
Preformatted text {
// create an instance of CadRasterizationOptions and set page height & width
//var rasterizationOptions = new Aspose.CAD.ImageOptions.CadRasterizationOptions();
// Set image width & height
//rasterizationOptions.PageWidth = 500;
//rasterizationOptions.PageHeight = 500;
// Set the drawing to render at the center of image
//rasterizationOptions.CenterDrawing = true;
//var layers = ((Aspose.CAD.FileFormats.Cad.CadImage)image).Layers;
// create an instance of PdfOptions
// var options = new Aspose.CAD.ImageOptions.PdfOptions();
// var layersList = image.Layers;
// rasterizationOptions.Layers = layersList.GetLayersNames().ToArray();
// options.VectorRasterizationOptions = rasterizationOptions;
Aspose.CAD.ImageOptions.PdfOptions pdfOptions1 = new Aspose.CAD.ImageOptions.PdfOptions();
image.Save("output.pdf",pdfOptions1);
}
layers in pdf.png (18.8 KB)
no layers in pdf.png (20.8 KB)