问题标签 [phppowerpoint]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
4 回答
4164 浏览

php - PhpPowerpoint 设置幻灯片宽度和高度(幻灯片尺寸)

我想知道是否有一种方法可以创建具有预定义宽度和高度而不是默认值的 ppt 文件。

0 投票
1 回答
511 浏览

php - PHPPowerpoint 和 setColSpan 问题

我正在尝试使用 PHPPowerpoint 创建一个表。我在处理合并表格单元格时遇到了一个问题,如下所示:

这就是我得到的

当前的

这就是我要找的

预期的

我观察到的是,只有第 3 和第 6 个元素$arr被打印出来。这可能是由于 3 的setColSpan属性(打印了 3 的倍数)吗?如果是,我该怎么做?

0 投票
1 回答
886 浏览

phppowerpoint - PHPPowerPoint:设置行之间的行高

我正在使用 phppowerpoint 生成 ppt 文件。我想更改 PPT 中各行之间的默认行高。

ppt幻灯片屏幕抓取

这是我用来生成ppt的一些代码。

然后创建一个换行符

我尝试使用 2 个换行符,但这超出了我的需要。

我也尝试过这里提到的解决方案

http://phppowerpoint.codeplex.com/discussions/273396

但是使用该解决方案,它只会在段落之前和之后添加空间。

是否有任何备忘单或列表包含为 powerpoint 生成的 xml 文件中使用的 xml 节点/元素/名称

0 投票
1 回答
1298 浏览

php - 带有 PHPPowerpoint 问题的 PHP 读取文件

我正在使用 PHPPowerpoint 创建一个带有一些图表的 pptx 文件,并且将其存储在与 PHP 脚本相同的文件夹中没有问题。PHPPowerpoint 自己做的。

我想在创建 pptx 文件后下载它,到目前为止,我已经尝试了我可以在网络上找到的所有选项。这就是我尝试在ATM上做的方式。:

执行脚本时没有下载任何内容。我的pptx是在服务器上创建的,可以打开,没问题。但它不会下载文件。我从这个线程得到了内容类型:什么是 docx、pptx 等的正确 mime 类型?. 我也尝试了许多其他类型。当我控制台记录我的响应时,我得到一个奇怪的字符串(很长),像这样开始:PKCTDD����[Content_Types].xml͗�n�0E�|E�-J��*�X����� +��������wBhE

也试过这个:

有谁能帮忙吗?

0 投票
1 回答
512 浏览

php - PHPPowerPoint Charts Broken?

I have a web page with a chart (FusionChart) that I'm trying to download as a PowerPoint slide with a chart -- one that PowerPoint recognizes as a chart so it will allow the user to edit chart properties (ie: no image).

To this end, I downloaded PHPPowerPoint. After multiple distributions, include path hell, and much wailing and gnashing of teeth, I finally got the thing to work. Kind of. It produces the following:

enter image description here

As you can see, the chart is misplaced and it's empty. Here's the chart zoomed, so you can see it more clearly:

enter image description here

Given all the things wrong with this library and its complete lack of documentation, I'm inclined to think it's broken. However, people appear to be using this, so it's safer to assume I did something wrong.

A code snippet is below. Am I doing anything wrong? Alternatively, are there any free alternatives to PHPPowerPoint? All I care is about exporting a chart, so very limited functionality (Bar, Column & Pie graphs with a title) is all I need.

Thanks in advance.

0 投票
1 回答
1318 浏览

php - 通过 php 或 javascript 将 SVG 转换为 Powerpoint

所以我想出了如何使用 d3 创建 SVG 图表,并将它们整齐地显示在网页上供所有人查看。问题是我需要将这些 SVG 图导出到 powerpoint。我已经开始使用 PHPPowerpoint 并且可以将图像从 web 目录拉到 powerpoint 幻灯片,

但我不知道现在如何将 SVG 图表从它们生成的 html 页面带到 powerpoint?

我以为我可以将它们保存到 web 目录然后使用 PHPPowerPoint....但我无法弄清楚将生成的 SVG 图表保存到 PNG 或 JPG 到 web 目录的第一步?

如果我可以转换为 PNG 或 JPG,然后使用 POST 提交这些图像,我可以将它们保存到服务器吗?

抱歉,对于大多数人来说,这可能是一个简单的问题。这是我尝试过的一些代码,但是当我完成时,圆圈仍然是 SVG ......不是 img ......

所以我发现因为我无法在我使用canvg的主机服务器上安装一些东西。我无法让图表看起来 100% 相同......我认为这可能是形状渲染:crispEdges 没有进入 canvg。

0 投票
3 回答
2288 浏览

php - 下载刚刚用 PHP 创建的 PowerPoint

我正在尝试将 PHPPowerPoint 添加到我的工具之一。我添加了 PHPPowerPoint 需要的所有文件并将下载链接写入正确的页面,但是当我尝试下载它时,它告诉我我没有访问该文件的许可。我尝试手动更改许可,但没有任何改变,因为每次 PHP 使用默认许可创建一个新文件。我试图在它上面使用 chmod 但没有任何改变。我还尝试了 chgrp 和 chown 来更改所有者(即“守护进程”)。

这很奇怪,因为当我从工具中使用它时,只有创建 PP 文件的代码,一切都适用于这个许可证。

我要添加 PP 文件下载的工具是用 codeigniter 编码的。

0 投票
2 回答
606 浏览

hyperlink - PHPPowerpoint在表格单元格中设置超链接

我想在表格单元格中设置一个超链接:

此代码不起作用:

0 投票
1 回答
956 浏览

php - PHPPowerPoint 可以复制现有的 PowerPoint

我想通过从多个 Powerpoint (PPT) 演示文稿中复制幻灯片来制作主 Powerpoint 或 .PPTX。我想给 PHPPowerPoint 一个文件位置列表作为输入,让它创建主 PPT 或 PPTX。PHPPowerPoint 可以做到这一点吗?

谢谢

0 投票
1 回答
272 浏览

php - PhpPowerpoint 手动安装

我正在尝试手动安装 PhpPowerpoint(不使用作曲家)

我已经安装了具有 document_root D:\wamp\www\ 的 WAMP

我已将 PhpPowerpoint 文件夹复制到以下路径 D:\wamp\www\php\PhpOffice\

使用手动安装代码(代码在文件 D:\wamp\www\php\agile\expMSPowerpoint.php 中):

我得到错误:

致命错误:第 435 行的 D:\wamp\www\php\agile\expMSPowerpoint.php 中找不到类“PhpPowerpoint”

任何安装它的帮助将不胜感激