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

  • 相关阅读:
    Web Api系列教程第2季(OData篇)(一)——OData简介和一个小应用
    漫步ASP.NET MVC的处理管线
    使用ASP.NET Web Api构建基于REST风格的服务实战系列教程【十】——使用CacheCow和ETag缓存资源
    工具分享——将C#文档注释生成.chm帮助文档
    使用ASP.NET Web Api构建基于REST风格的服务实战系列教程【外传】——Attribute Routing
    使用ASP.NET Web Api构建基于REST风格的服务实战系列教程【九】——API变了,客户端怎么办?
    使用ASP.NET Web Api构建基于REST风格的服务实战系列教程【八】——Web Api的安全性
    C#基础——谈谈.NET异步编程的演变史
    使用ASP.NET Web Api构建基于REST风格的服务实战系列教程【七】——实现资源的分页
    使用ASP.NET Web Api构建基于REST风格的服务实战系列教程【六】——实现资源间的关联
  • 原文地址:https://www.cnblogs.com/xilifeng/p/4692898.html
Copyright © 2011-2022 走看看