美文网首页
解决python中导出的pdf不能编辑问题

解决python中导出的pdf不能编辑问题

作者: 生信编程日常 | 来源:发表于2022-08-20 04:50 被阅读0次

    python默认输出的pdf格式是type3,这种不能在 Adobe Illustrator中编辑文字等信息,需要改成type42.

    import matplotlib as mpl
    mpl.rcParams['pdf.fonttype'] = 42
    

    或者直接更改matplotlib的默认设置:
    找到matplotlib路径下的matplotlibrc文件,将matplotlibrc里pdf.fonttype : 3改成42

    pdf.fonttype : 42 # Output Type 3 (Type3) or Type 42 (TrueType)
    

    相关文章

      网友评论

          本文标题:解决python中导出的pdf不能编辑问题

          本文链接:https://www.haomeiwen.com/subject/ytepgrtx.html