3

Here is some background info. I'm on a shared linux server with hostgator.

I've looked at

to no avail.

My server setup either does not support the setup or the program does not do what I need.

I want to programmatically using php

  • allow my users to upload .doc files,
  • convert them to .pdf files,
  • add either a background/watermark/stamp with my company logo/link to website on each page of the converted .pdf file,
  • merge the converted .pdf file to an existing promotion .pdf file,
  • save and store the completed file to the server/database using the original file name of the .doc file,
  • and then email the file to my mailing list.

What are my options? Any suggestions...?

4

3 回答 3

1

您可能需要考虑迁移到 VPS 以安装您自己的模块,或者询问 hostgator 是否会为您安装一个。

到目前为止,我看到的最好的是Prno,它在 php 中使用 OpenOffice API——尽管这在共享的 hostgator 服务器上可能是不可能的。

Antiword将 word 文档转换为纯文本或 postscript,这看起来很不错 - 尽管您必须检测它是哪种类型的文档,因为如果它是 docx,您将不得不使用不同的方法来处理文档......尽管再一次,这在共享的 hostgator 服务器上可能是不可能的。

您可能需要考虑获得一个对程序员更友好的主机。我使用 ChicagoVPS(链接是我的附属链接 -这是一个非附属链接),因为它们具有相当不错的性能(我过去的 linode 盒子在 CPU 任务方面确实看起来有点快),经常出现在lowendbox上,你几乎总是可以以每月 7 美元的价格购买 2GB 的 ram openvz 盒子(来自他们的芝加哥数据中心)(促销代码:2048)。

我的性能下降了 2 天,但由于一些硬件问题和维护,他们每天多次通知我状态,并及时修复,所以我一直坚持下去。

如果 vps 不适合您,那么有webfaction - 一个对程序员非常友好的“共享”主机。

于 2012-12-07T17:50:40.957 回答
1

您是否考虑过在 Headless 模式下运行 OpenOffice?这是我发现的一个快速链接,它可能会让您朝着正确的方向前进。

http://qugstart.com/blog/linux/openoffice-headless-mode-installation-word-doc-to-pdf-conversion/

于 2012-05-18T18:20:05.363 回答
0

如果使用 Web 服务是您的应用程序的可行选项,请查看Docmosis Cloud 服务。从您的需求列表中:

  1. 上传文档 - 是的
  2. 制作 pdf - 是的
  3. 水印 - 是的
  4. 合并 - 是的 - 但您必须提供 doc 或 odt 版本而不是 pdf
  5. 存储在 db - 您的控制(您可以将流式传输的结果保存到 db)
  6. 电子邮件 - 是的

从 PHP 访问非常简单,因为您只需 HTTPS 发布请求。请注意,我为开发 Docmosis 的公司工作。

于 2012-07-06T06:37:43.507 回答