zoukankan      html  css  js  c++  java
  • Typora

    Typora

    使用textutil进行文件格式转换

    textutil进行文件转换支持的格式有:

    • txt,
    • html,
    • rtf, rtfd,
    • doc, docx,
    • wordml, odt,
    • webarchive

    同时,pdf是默认支持转为

    • txt
    • rtf
    • png/jpeg等图片格式

    转换单个文件的命令为:

     
     
    textutil -convert doc /path/to/my/file.docx

    批量转换文件的命令为:

     
    xxxxxxxxxx
     
    textutil -convert doc /path/to/location/*.docx
     
    xxxxxxxxxx
     
    textutil -convert docx xx.pdf -output xx.docx

    参数说明:

    • convert 后的参数是转换后的文件格式
    • output后是输出文件的格式.

    自带的例子:

     
    x
     
    textutil -info foo.rtf
    displays information about foo.rtf.
    textutil -convert html foo.rtfconverts foo.rtf into foo.html.
    textutil -convert rtf -font Times -fontsize 10 foo.txtconverts foo.txt into foo.rtf, using Times 10 for the font.
    textutil -cat html -title "Several Files" -output index.html ∗.rtf
    loads all RTF files in the current directory, concatenates their contents, and writes the result out as index.html
    with the HTML title set to "Several Files".

    文档:

    • man textutil

    • man textutil -t | open -fa Preview

      textutil

  • 相关阅读:
    【BZOJ】2453: 维护队列【BZOJ】2120: 数颜色 二分+分块(暴力能A)
    【转】使用json-lib进行Java和JSON之间的转换
    【转】MySQL索引和查询优化
    【转】SQL常用的语句和函数
    【转】MySQL日期时间函数大全
    VMare中安装“功能增强工具”,实现CentOS5.5与win7host共享文件夹的创建
    MyEclipse中消除frame引起的“the file XXX can not be found.Please check the location and try again.”的错误
    由于SSH配置文件的不匹配,导致的Permission denied (publickey)及其解决方法。
    复选框的多选获取值
    echart环形图制作及出现的一些问题总结
  • 原文地址:https://www.cnblogs.com/xilifeng/p/4692898.html
Copyright © 2011-2022 走看看