命令行当量,以从Mac OS X的Finder打印.docx文件 [英] Command line equiv to print a .docx file from Mac OS X finder

查看:242
本文介绍了命令行当量,以从Mac OS X的Finder打印.docx文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序需要在命令行中打印的MS Word .docx文件。其背景是,这是与CUPS-PDF为默认打印机雪豹服务器上。如果在取景器上我.docx文件单击一次,选择,然后选择从文件菜单打印它打开微软Word(2011年安装)和PDF格式文件打印到阀芯(通过CUPS)。完善!现在是什么是bash命令相当于???

I have an application need to print a MS Word .docx file from the command line. The background is this is on Snow Leopard Server with CUPS-PDF as the default printer. If in the finder I click once on the .docx file to select and then select print from the file menu it opens MS Word (2011 is installed) and prints the file to the spool (via CUPS) in PDF format. Perfect! Now what is the BASH command equivalent of that???

我曾尝试LPR,只出现与连胜文的文件工作。我试图打开它打开MS Word中,但我看到了不公开打印选项。我已经尝试了平时的MS Office当量(OpenOffice和LibreOffice),这两个工作,但生成的PDF布局从Word生成到目前为止,这是可耻不可接受的。我尝试使用osascript = =的AppleScript其中工程,但参差不齐的 - 它并不总是触发。

I have tried lpr, which only appears to work with straight text files. I have tried OPEN which OPENS MS Word but I see no "print" option for open. I have tried the usual MS Office equivalent (OpenOffice and LibreOffice) which both work but the generated PDF layout is so far from that generated by Word that it is shamefully unacceptable. I tried using osascript = AppleScript = which works but is spotty - it does not always trigger.

我的挑战是我创造的一个PHP程序的模板字之外的.docx,只是需要将其转换为PDF保留所有格式。

My challenge is I am creating the .docx outside of word from a template with a PHP program and just need to convert it to PDF retaining all formatting.

推荐答案

看看发布,可在这里:的 http://sabi.net/nriley/software/ ,也容易安装使用自制或MacPorts的。

Take a look at launch, available here: http://sabi.net/nriley/software/, also easy to install using homebrew or macports.

这就像打开,但增加了一些额外的功能,包括

It is like open, but adds some extra features, including

-p       Ask application(s) to print document(s).

这篇关于命令行当量,以从Mac OS X的Finder打印.docx文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆