Is there any way to specify the output filename and directory that qlmanage uses?

We are using qlmanage to convert word documents to HTML, and it writes Preview.html to its temp directory. You can specify the output directory with -o, so right now we create a new directory for each file we write, which works fine, but... not optimal.

No mention of such a facility in the command line options, but i thought i'd ask in case there is some undocumented trick.



1 Answer 1


You can use textutil to convert Word documents to HTML and specify the output filename; it uses a different converter, though, which may not be acceptable for your uses.

With regard to qlmanage, you're abusing Quick Look here already. The output is a directory, not a file, which is only designed for Quick Look to consume. That Preview.html is a fixed filename is by design; otherwise the Quick Look displayer wouldn't know where to start. That you're able to extract the HTML output yourself is a nice side effect, nothing more.

  • Thanks Nicholas, that is what i expected, but thought i'd ask. The quality of the HTML that qlmanage creates is pretty excellent, do you know if textutil uses the same libraries?
    – ipd
    May 3, 2011 at 2:25
  • Nope (I addressed this in my the first sentence of my response). Apple has 3 different Office importers/exporters: the doc/docx I/O in Cocoa Text (which is what textutil uses), the iWork importers/exporters (*Compatibility.framework, which you'll find in the bundles of each iWork app), and the Quick Look/iOS previewers (the private OfficeImport.framework). The latter two share quite a bit of code, and tend to be more robust/capable because they support the iWork feature set rather than just that of Cocoa Text. May 3, 2011 at 3:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .