Newname = os.path.join(outputdir,newname)įiles = glob.glob(os.path.join(dir,"*. Outputdir = r"C:\Users\Paul\Documents\web\ykfp\Par16\Presentations\pdf" I suppose if you wanted to avoid overwrite, you would have to use try-except somehow. By default, the SaveAs overwrites files in the output directory if they already exist, which is fine by me. I tried a couple times to get lines 13 -15 combined into one line, but I don't have time for that kind of elegance.
Now the pdf files are written to a different folder, outputdir. You can also choose to open System Preferences directly from your Launchpad, Dock, or desktop shortcut. #for file in [ ppt for ppt in os.listdir(dir)įiles = glob.glob(os.path.join(dir,"*.ppt*")) Unlike most third-party PPTX conversion utilities, it doesn’t allow you to batch convert PPT files, and requires opening the PPT file to manually convert it into the PPTX format. Now if I can just direct the output files to a different folder, I'll be done.ĭir = r"C:\Users\Paul\Documents\web\ykfp\Par16\Presentations\YBSMC 2016 Thursday" Your suggestion to change ppt? to ppt worked well to pick up both the old and the new file extensions. PowerPoint opens up, shows a little "publishing" progress bar for each input file, then Powerpoint shuts down.
I'll read up on this.) So I replaced the sys.argv with my dir variable in line 25, and it ran. (Still, I don't understand entirely how this magic works. I set the path explicitly, then got side tracked with a for loop to test the list contents, lines 18 - 23, now commented out, and when that part showed me a good list of files, I almost put lines 25- 27 in the for loop, but then thought, hey that's what the glob.glob part is supposed to do. Thanks, Darren, that's a lot like what I came up with on my own.
But it seemed to run to completion, giving "returned exit code 0" in the PythonWin bottom bar, but I can't find any output pdf file on my system. Running the script in pythonwin made it easier to insert an input file name as argv, and I didn't hit any of the win32 errors.
I'm running ArcGIS 10.3.1 on a 64 bit Windows system, so it looks like python 2.7.8, so I tried the install of win32 2.7 32 bit. Looking through posts at Geonet, I found that I was having this problem with win32 back in 2006, and the easy way out is to run it in PythonWin. Can you convert a PDF to PowerPoint Yes, you can And its easy Upload your PDF via drag & drop, browsing your device. Newname = os.path.splitext(filename) + ".pdf"ĭeck = (filename)įiles = glob.glob(os.path.join(sys.argv,"*.ppt?"))įirst I tried running the script in IDLE, but first hit No module named, then after I installed pywin extensions for python 27, 32 bit, I got ImportError: No module named win32api. If I can see this run once then I can extend it to loop through the whole folder and write to different output folder. I have a couple folders of PowerPoint files that I need to convert to PDF files, and I thought it would help me practice some python to see if I could script this task. Remember to leave your computer on (don’t close a laptop).This isn't a GIS question, but I thought maybe someone could help.
You might consider starting it at night before you go to bed. How to convert PPTX to PPT Step 1 Upload pptx-file (s) Select files from Computer, Google Drive, Dropbox, URL or by dragging it on the page. This process can take up to 2 or 3 hours to render depending on the size of your Powerpoint, how much audio is in it and the speed of your computer.
You will see a progress bar at the bottom of the Powerpoint window. Make sure to save the file to your computer in an easy to find location. In the Save as type pull down menu select the MPEG-4 Video (*.mp4) format. Once done press Close on the popup window Start by clicking the File menu button.Ĭlick Compress Media.
Once converted to MP4 you can upload it to Kaltura and place it into your class.
It is this 2nd one that we are going to convert to MP4. Saving your PowerPoint presentation (.pptx) as an earlier version, such as PowerPoint 97-2003 (.ppt), automatically turns on compatibility mode. , and then click Save in the Save As dialog box. Make sure you save your Powerpoint file twice, once with no narration (that way you can use it in class and narrate it live), and once again (with a different file name) with the narration. Next to Compatibility Mode, click Convert. These instructions display how to take voice over Powerpoint files and convert them to MP4 video files.