podofo 中文乱码

 时间:2024-11-12 23:03:13

1、为了方便,在文件头中加入这个预编译宏,表示把所有的字符当成utf8编码#if defined(_MSC_VER) && (_MSC_VER >= 1600)# pragma execution_character_set("utf-8")#endif

podofo 中文乱码

3、告诉垓矗梅硗 PdfString 将字符串当成utf8编码解析double w = pPage->GetPageS足毂忍珩ize().GetWidth(); double h = pPage->GetPageSize().GetHeight(); painter.DrawText( 10, 10, "Hello World!" ); PdfString str((pdf_utf8* )"测试podofo显示中文文本显示是否为乱码! \n \n"); painter.DrawMultiLineText( 0, 0, w, h, str);

podofo 中文乱码

5、将上面的锾哩菸谷全部代码段写入到源码中去const PdfEncoding* pp = PdfEncodingFact泠贾高框ory::GlobalIdentityEncodingInstance(); PdfFont* pFont = document.CreateFont("SimHei", true, true, false, pp);//Helvetica painter.SetFont( pFont ); double w = pPage->GetPageSize().GetWidth(); double h = pPage->GetPageSize().GetHeight(); painter.DrawText( 10, 10, "Hello World!" ); PdfString str((pdf_utf8* )"测试podofo显示中文文本显示是否为乱码! \n \n"); painter.DrawMultiLineText( 0, 0, w, h, str);

podofo 中文乱码
  • Win10如何查看电脑下载速度?
  • ipv4和ipv6的区别是什么?
  • Kali linux 怎么挂载Windows共享盘
  • 虚拟机如何设置连接网络
  • xshell使用root用户登录Ubuntu的配置修改
  • 热门搜索
    金佑人生保险怎么样 男生发型图片 道理的近义词 工资条怎么做 记忆犹新的近义词 怎么治疗黑眼圈 悠然的近义词 宝宝不吃奶怎么办 远视眼怎么治疗 爱戴的近义词