I want convert a dxf file into pdf format. However the result pdf did not show the correct font color and text rotation. The dxf and pdf files are attached
The code is as follows:
// convert to PDF
string fileStem = Path.GetFileNameWithoutExtension(outputCADModel);
License license = new License();
license.SetLicense(“Aspose.Total.lic”);
using (Aspose.CAD.Image image = Aspose.CAD.Image.Load(outputCADModel))
{
// Create an instance of CadRasterizationOptions and set its various properties
Aspose.CAD.ImageOptions.CadRasterizationOptions rasterizationOptions = new Aspose.CAD.ImageOptions.CadRasterizationOptions();
rasterizationOptions.PageWidth = 1600;
rasterizationOptions.PageHeight = 1600;
rasterizationOptions.BorderX = 10;
rasterizationOptions.BorderY = 10;
rasterizationOptions.CenterDrawing = true;
rasterizationOptions.ScaleMethod = ScaleType.GrowToFit;
rasterizationOptions.DrawType = CadDrawTypeMode.UseDrawColor;
rasterizationOptions.TypeOfEntities = Aspose.CAD.ImageOptions.TypeOfEntities.Entities2D;
// Add desired layers
rasterizationOptions.Layouts = new string[] { “Model” };
// Create an instance of PdfOptions
Aspose.CAD.ImageOptions.PdfOptions pdfOptions = new Aspose.CAD.ImageOptions.PdfOptions();
// Set the VectorRasterizationOptions property
pdfOptions.VectorRasterizationOptions = rasterizationOptions;
// Export the DXF to PDF
image.Save(fileStem+".pdf", pdfOptions);
}