0

我将尝试使用程序(C# 或 Java)将 ppt 转换为图像。我可以在 Stackoverflow 中搜索此解决方案,但问题如下:

ppt 有一些超链接,例如“转到下一页”和“转到特定幻灯片”。

将 ppt 转换为图像时,如何知道超链接在图像的位置?

任何语言都可以....如果我能在图像中找出超链接的位置。

4

1 回答 1

0

Each slide has a hyperlinks collection that contains all of the hyperlinks on the slide. Look at each hyperlink's .Type property.

If .Type = msoHyperlinkShape, you can get the hyperlink's coordinates by walking the .Parent chain up to the parent shape; use the shape's coordinates.

If .Type = msoHyperlinkRange, the hyperlink has been applied to text rather than to a shape, so you walk up the .Parent chain to the textrange that represents the hyperlinked text. The text range will have BoundLeft, BoundTop, BoundHeight, BoundWidth properties that give you the coordinates of the hyperlink.

From there, it's ratios ...

LinkLeft / SlideWidth = x / ImageWidthInPixels

Solve for x to get the distance in pixels from the left of the image to the left of the hyperlink position.

于 2013-03-06T16:19:53.607 回答