I uploded a very simple DWG file in the zip file. When I would like to convert it to PDF with Aspose.cad I do not get the same reuslt. image.png (2,8 kB)
You can see on the uploded image png, the selected tolerance display wrong in the PDF file. I suggestions?
@novakjanos,
tolerance symbols as well as some other symbols are stored in file with the reference to GDT font, that is supplied with AutoCAD. So “c” symbol corresponds to parallelogramm symbol in GDT. You may consider this example as an idea to replace such symbols directly or search for GDT font and install it:
using (CadImage cadImage = (CadImage)Aspose.CAD.Image.Load(fileName))
{
CadRasterizationOptions cadRasterizationOptions = new CadRasterizationOptions();
cadRasterizationOptions.PageHeight = 2000;
cadRasterizationOptions.PageWidth = 2000;
foreach (CadEntityBase entity in cadImage.Entities)
{
if (entity.TypeName == CadEntityTypeName.TOLERANCE)
{
CadTolerance tolerance = (CadTolerance)entity;
tolerance.ToleranceString = tolerance.ToleranceString.Replace("{\\Fgdt;c}", "\u25B1");
}
}
PdfOptions pdfOptions = new PdfOptions();
pdfOptions.VectorRasterizationOptions = cadRasterizationOptions;
cadImage.Save(outPath, pdfOptions);
}