Convert Font Family and Text Size of a Document from the Command Line

Jul 8, 2011 - Leave a Comment

Convert font and text size of a document

In addition to being able to convert TXT files to RTF or other filetypes, you can use textutil to convert the font family and font size of a document from the command line.

The syntax for doing this is:

textutil -convert filetype -font fontfamily -fontsize ## filename.txt

For example, to convert file.txt to an RTF document with size 24 Helvetica font, we would use:

textutil -convert rtf -font Helvetica -fontsize 24 file.txt

The conversion is practically instantaneous. Because this is scriptable from the command line, it is potentially more useful than just opening a document in TextEdit and going about this through the GUI, at least for some Mac users.

Related articles:

Posted by: William Pearson in Command Line, Tips & Tricks

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

OSXDaily on Facebook

OSXDaily on Google+

Shop at Amazon

Ad

Shared on Facebook