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

  • 相关阅读:
    php与WebservicesNuSOAP的使用说明(转载)
    获取cpu序列号,硬盘ID,网卡MAC地址(转载)
    system.net.sockets.tcplistener
    用VS2005实现软件多语言版本的迅捷开发(转载)
    洛谷P1776 宝物筛选 题解 多重背包
    2013 ACMICPC亚洲区域赛南京站C题 题解 轮廓线DP
    2017 ACMICPC亚洲区域赛北京站J题 Pangu and Stones 题解 区间DP
    洛谷P1385 密令 题解 动态规划
    洛谷P1028 数的计算 题解 动态规划入门题
    洛谷P1029 最大公约数和最小公倍数问题 题解
  • 原文地址:https://www.cnblogs.com/xilifeng/p/4692898.html
Copyright © 2011-2022 走看看