Aspose.Cad for .Net 23.7 Dwf转pdf后,有以下几个问题:
- pdf中的文字字体和dwg中的字体对不上,文字还有高有低不在一条水平线上。我在代码中设置了输出的字体。
- dwg中垂直的文字导出pdf后还是水平。
- PageWidth ,PageHeight 如果设置成图框的尺寸时,文字加粗了,请问我应该怎么设置。
file:
file.zip (547.0 KB)
float windowWidth = 1189f; // 窗口宽度
float windowHeight = 841f; // 窗口高度
PdfOptions pdfOptions = new PdfOptions();
ctbFileStream = new FileStream(ctbPath, FileMode.Open);
CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions();
rasterizationOptions.PageWidth = windowWidth;
rasterizationOptions.PageHeight = windowHeight;
rasterizationOptions.DrawType = CadDrawTypeMode.UseObjectColor;
rasterizationOptions.VisibilityMode = VisibilityMode.AsPrint;
rasterizationOptions.Zoom = 1f;
rasterizationOptions.NoScaling = false;
IDictionary<string, Stream> keyValuePairs = new Dictionary<string, Stream>();
keyValuePairs.Add("test", ctbFileStream);
rasterizationOptions.CtbSources = keyValuePairs;
rasterizationOptions.Quality.Text = RasterizationQualityValue.High;
rasterizationOptions.ShxFonts = new string[] { { "D:\\Work\\CAD\\Fonts\\ROMANC-H.SHX" };
rasterizationOptions.AutomaticLayoutsScaling = true;
pdfOptions.VectorRasterizationOptions = rasterizationOptions;