转换MS-Office为pdf [英] Convert MS-Office to pdf

查看:141
本文介绍了转换MS-Office为pdf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用OfficeToPDF将MS-Office文件转换为pdf.但是,我只能运行以下命令:

I'm using OfficeToPDF to convert the MS-Office files to pdf. However, I only can run the command:

OfficeToPDF test.doc test.pdf

在cmd中(Windows)

in cmd (windows)

我想将此代码嵌入到我的cgi文件(Perl)中.谁能告诉我该怎么做,谢谢!

I want to embed this code into my cgi file (Perl). Can anyone show me how to do this, thank you!

(我用过

system("OfficeToPDF test.doc test.pdf");

但似乎不起作用

推荐答案

尝试:

  • 使用到OfficeToPDF的完整路径并定位PDF位置,因为通常CGI脚本在另一个用户上下文中运行,
  • 检查一下,CGI用户对两个文件都具有读写权限(当然,还有执行OfficeToPDF的权限)
  • use the full paths to OfficeToPDF and target PDF location because usually, the CGI scripts are run in another user context,
  • check, the CGI user has reading and writing rights for both files (and, off sure, right to execute the OfficeToPDF)

但是,这肯定取决于什么意思它不起作用".

But it depends what means "it's not work", of sure.

这篇关于转换MS-Office为pdf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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