是否有任何GNU/Linux命令行实用程序将.doc(x)文件转换为.pdf? [英] Is there any GNU/Linux command line utility that converts .doc(x) files to .pdf?

查看:128
本文介绍了是否有任何GNU/Linux命令行实用程序将.doc(x)文件转换为.pdf?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当然,我是第100个提出这个问题的用户,但是在这里和其他网站上搜索了相似的主题之后,我仍然找不到我需要的东西.我喜欢为我的GNU/Linux提供一个简单的命令行工具,该工具可将.doc(x)文件转换为.pdf,但输出看起来与原始文件相同.因此,Libre Office并不是很好的选择,因为在某些情况下它不能转换为好的.我发现一个网站 http://www.freepdfconvert.com/做得很好,但我无法将任何敏感信息上传到该网站文件,因为这是一个很大的风险.我不是说他们会对他们做任何坏事,但是它是怎么回事.如果我找不到任何好的工具,也许我将不得不自己编写一个工具.

Surely I am the 100th user who is asking this but after I have searched through the similar topics here and on other websites I still cannot find what I need. I like to have a simple command line tool for my GNU/Linux which converts .doc(x) files to .pdf BUT the output looks like the same as the original. So Libre Office is not good choise for this because it does not convert good in some cases. I have found a website http://www.freepdfconvert.com/ which does the job wery well, but I cannot upload there any sensitive files since it is a big risk. I dont say they would do anything bad with them but its how it is. If I wont find any good tool maybe I will have to write one by myself.

推荐答案

不幸的是,没有将Word(doc/docx)转换为PDF的基于Linux的保证的一对一转换器.这是因为Microsoft产品Word所使用的专有格式在每个发行版中都会略有变化.由于它不是传统上公开记录的格式,并且Microsoft不会(永远也不会)将Word/Office移植到Linux,因此您必须依靠反向工程的第三方工具来获得较旧的格式(文档),并通过第三方开发商.

Unfortunately there are no Linux-based guaranteed 1-to-1 convertors for Word (doc/docx) to PDF. This is because Word, a Microsoft product, uses a proprietary format that changes slightly with every release. As it was not traditionally a publicly documented format and Microsoft does not port Word/Office to Linux (nor ever will) then you must rely upon reverse engineered third party tools for older formats (doc) and proper interpretation of the Office Open XML format by third party developers.

我们发现最好的开源解决方案是 LibreOffice (它是从OpenOffice.org派生的,在开源之前称为Star Office).作为另一个答案,它比AbiWord更积极地开发.

We found the best open source solution is LibreOffice (which was forked from OpenOffice.org, which itself was called Star Office before it was open sourced). It is much more actively developed than AbiWord, as another answer suggested.

命令行中的用法很简单,并且详细记录,其中包含大量示例:

The usage from the command line is simple and well documented with plenty of examples:

soffice --headless --convert-to pdf filename.doc

或者在较新版本上,也可以使用libreoffice代替soffice.

Or also you can use libreoffice instead of soffice on newer versions.

这篇关于是否有任何GNU/Linux命令行实用程序将.doc(x)文件转换为.pdf?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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