powerpoint

How to convert a .pptx to .pdf using Python

拟墨画扇 提交于 2019-12-04 18:03:56
问题 I have been looking to convert a .pptx file to a .pdf file through a Python script for several hours but nothing seems to be working. What I have tried: I have tried 1) this script which calls windows32.client, and 2) unoconv, but none of them seem to be working for me. Problems encountered: Using script from first option throws up an error ( com_error: (-2147352567, 'Exception occurred.', (0, None, None, None, 0, -2147024894), None) ), whereas in second option Python can't seem to recognize

Chinese characters converted to squares when using APACHE POI to convert PPT to Image

限于喜欢 提交于 2019-12-04 17:25:49
I got a problem when I try to use Apache POI project to convert my PPT to Images. My code as follows: FileInputStream is = new FileInputStream("test.ppt"); SlideShow ppt = new SlideShow(is); is.close(); Dimension pgsize = ppt.getPageSize(); Slide[] slide = ppt.getSlides(); for (int i = 0; i < slide.length; i++) { BufferedImage img = new BufferedImage(pgsize.width, pgsize.height, BufferedImage.TYPE_INT_RGB); Graphics2D graphics = img.createGraphics(); //clear the drawing area graphics.setPaint(Color.white); graphics.fill(new Rectangle2D.Float(0, 0, pgsize.width, pgsize.height)); //render slide

PowerPoint 2007/2010 VBA ppam Add-In does not show up in VBA editor when open

不想你离开。 提交于 2019-12-04 15:31:47
I've created a PowerPoint 2007/2010 VBA Add-In (.ppam) some code in a module. I've also added an XML ribbon (not important, but it shows me that the file is in fact open in PowerPoint). I can click a button in the ribbon I created and it will execute code from my module. cool. When I open the VBA editor (ctrl + F11), the Add-In does not show up. In fact, if I don't have another document open I can't even open the editor. I've tried this in PowerPoint 2007 and 2010. How can I edit the code of a PowerPoint Add-In I've already created? I've made many VBA Add-Ins in Excel, but maybe PowerPoint is

How to replace text in a PowerPoint (.ppt) document?

耗尽温柔 提交于 2019-12-04 14:01:28
What solutions are there? I know only solutions for replacing Bookmarks in Word (.doc) files with Apache POI? Are there also possibilities to change images, layouts, text-styles in .doc and .ppt documents? I think about replacement of areas in Word and PowerPoint documents for bulk processing. Platform: MS-Office 2003 What are your platform limitations? Obviously Apache POI will get you at least part of the way there. Microsoft's own COM API's are fairly powerful and are documented here . I would recommend using them if a) you are not running in a server (many users, multithreaded) environment

microsoft office powerpoibt automation 二次开发

假如想象 提交于 2019-12-04 13:47:52
背景 首先office的产品powerpoint是支持二次开发的,这里的二次开发并不是指在powerpoint产品中嵌入一些自己的控件,而是一些简单的automation的控制(进入放映状态,上一页,下一页等),并不对powerpoint的产品有任何修改。microsoft官网就提供了很多关于automation的demo,这些demo都可以在 https://code.msdn.microsoft.com/site/search?query=&f%5B0%5D.Value=&f%5B0%5D.Type=SearchText&ac=4 上搜索关键字下载。 注册表 这里之所以提到注册表,是因为开发阶段一般都会安装多个版本的powerpoint,这些不同版本的软件在卸载时,并不一定会清理注册表,但是我们的程序需要根据注册表上的版本号找到对应的pia,也就是打包好的程序集,如果有未清理的注册表信息存在,就会导致代码不工作。 powerpoint的激活向导或者保护模式 正常思路的automation应该是:打开powerpoint软件 => 打开需要自动化控制的ppt => 进入放映模式 。但是因为没有激活的powerpoint软件,或者是只读的文件,会导致自动化控制失败,绕开这一步的做法就是 直接执行最后一步 => 进入放映模式。这样可以避免前面两个操作带来的不可控性。 代码 Step1

Insert images to powerpoint slide using python (win32com.client)

自古美人都是妖i 提交于 2019-12-04 12:44:20
I have been tasked with inserting and re-sizing several hundred images to a powerpoint. I need to use a particular source format that is similar to other power points used by our company. I have been playing around with activepython's win32com API's and I have figured out how to open up a file and create a blank slide. My question is how would I go about inserting an image and resizing it to whatever size I need(the images will be the only thing on each page). Also I am trying to use my company's theme for the background and title page but this is not as important as getting the images on page

Convert file .pptx to .ppt using Java

怎甘沉沦 提交于 2019-12-04 12:25:47
I was wondering if someone knows a way to convert .pptx to .ppt progamatically using Java? Use Apache POI . You can use openoffice for conversion. You have to configure eclipse/netbeans properly . You need jodconverter plugin, too. oh, and remember to open OO in listening mode package openofficeconv; import java.io.File; import java.net.ConnectException; import com.artofsolving.jodconverter.DocumentConverter; import com.artofsolving.jodconverter.openoffice.connection.*; import com.artofsolving.jodconverter.openoffice.converter.OpenOfficeDocumentConverter; public class PowerpointConverter{

Display Cocoa window above Keynote presentation

 ̄綄美尐妖づ 提交于 2019-12-04 10:25:28
Some context: I am building a tool to be used on screen during a Keynote or PowerPoint presentation. The biggest issue I've had so far is that Keynote seems to take over the desktop whenever you view a presentation. I have tried setting my Cocoa window's level to the maximum using: [[self window] setLevel:kCGMaximumWindowLevel]; That seems to have some effect (I can have the window hover over Keynote's "control panel" that's active in the off-screen window), but it doesn't let me hover over the actual presentation. Any ideas? Thanks in advance for the help! Try setting the level to

Convert all “Worksheet Objects” to images in powerpoint

瘦欲@ 提交于 2019-12-04 09:41:07
问题 Really not sure what stack site to place this on. Feel free to move it to the correct one. My question isn't really related to programming, but I have a ton of power points with these "Worksheet Objects" embedded in the slides. Some appear to be graphs from excel as well as other chart type items from Visio. I need to convert all these "Worksheet Objects" to just images within the slide. My process right now is copy the object > Paste as Image > Move to the correct location > Delete the

How to programmatically create a powerpoint from a list of images

半世苍凉 提交于 2019-12-04 06:48:40
I've seen this question: Creating PowerPoint presentations programmatically , but that question asks "Can you?" to which the answer is "yes". But I'm asking "How?" and specifically "From a list of images?" Here's what I do to break a ppt up into images var app = new PowerPoint.Application(); var pres = app.Presentations; var file = pres.Open(input, MsoTriState.msoFalse, MsoTriState.msoFalse, MsoTriState.msoFalse); file.SaveAs(output, Microsoft.Office.Interop.PowerPoint.PpSaveAsFileType.ppSaveAsJPG, MsoTriState.msoTrue); file.Close(); app.Quit(); How do I do the reverse? It'll be something like