彩票走势图

彩票走势图 > 慧问 > 频道

DotImage的RecoStar Engine修改字体属性的问题[DotImage]

发表于2019-05-10 回复:0 查看:2504  |  
为了创建可搜索文档,我们使用了Recostar OCR引擎。它支持土耳其字符。但是当我们使用它的翻译功能时,出现一些乱码,而非土耳其的字符。我想知道如何更改其字体属性? 代码如下: FileStream fs = new FileStream(inputFile, FileMode.Open); Atalasoft.Imaging.Codec.Pdf.PdfDecoder dec = new Atalasoft.Imaging.Codec.Pdf.PdfDecoder(); dec.Resolution = 200; int ss = dec.GetFrameCount(fs); Atalasoft.Imaging.ImageCollection coll = new Atalasoft.Imaging.ImageCollection(); for (int i = 0; i < ss; i++) { Atalasoft.Imaging.AtalaImage aim = dec.Read(fs, i, null); coll.Add(aim); } fs.Close(); Atalasoft.Ocr.RecoStarLoader loader = new Atalasoft.Ocr.RecoStarLoader(); Atalasoft.Ocr.RecoStar.RecoStarEngine eng = new Atalasoft.Ocr.RecoStar.RecoStarEngine(loader); eng.RecognitionCulture = System.Globalization.CultureInfo.CurrentCulture;// = tr-TR Atalasoft.Ocr.PdfTranslator trans = new Atalasoft.Ocr.PdfTranslator(); trans.OutputType = Atalasoft.Ocr.PdfTranslatorOutputType.TextOnly; Atalasoft.Imaging.ImageCollectionImageSource source = new Atalasoft.Imaging.ImageCollectionImageSource(coll); try { eng.Initialize(); eng.Translate(source, "application/pdf", Application.StartupPath + "\\out_search.pdf", trans); } catch (Exception ex) { MessageBox.Show(ex.Message); } eng.ShutDown(); eng.Dispose();
0个回答

打破零回复...

回复

登录 慧都网发表评论

扫码咨询


添加微信 立即咨询

电话咨询

客服热线
023-68661681

TOP