How do I programmatically convert a Keynote file to a PowerPoint? - powerpoint

Anyone know any good tools to convert a keynote file to a PowerPoint one? We have an online tool that currently accepts PPT/PPTX files and we then use Aspose tools to do more with it. But we're needing to accept keynote files too and the easiest way in theory is to convert it to a PPT file and then process in the same way from there.
However we're really struggling to find a way to convert them programmatically!
Any ideas?

Old question but by the views counter seems relevant for many.. a conversion service such as CloudConvert can do the job (https://cloudconvert.com/api/conversions). At least for converting .key to .pptx (not sure about the other way round).

Related

I need a wrapper (or alternative) for Open Office XML Presentations / Powerpoints

I recently automated the creation of Powerpoint Presentations in a site I'm making. I found the Office Interop libraries extremely simple to use.
Office isn't built for this kind of thing in a webserver environment, so I'm looking at creating the Powerpoints using Open Office XML, only it's so extremely complex. For example I downloaded some code to create a blank presentation with some text. This code was around 300 lines! Using the Office Interop libraries I could do the same thing in just a couple of lines of code.
I don't have time, nor do I want to attempt to learn how to interact with the Open Office XML libraries, so I'm hoping someone has made a wrapper for the Open Office XML libraries. So far all my searching has only given me one result, Aspose Slides for .NET. This looks really hopeful, but it also looks rather expensive
Has anyone ever used a decent wrapper or alternative before?
If you are looking at automating the creation of Powerpoint presentation files, I'd say you continue with OpenXML, there's nothing better than it. Everything else is either paid or don't offer entire gamut of functionality that Open XML can provide.
If you find creating a blank file tedious, you could save an empty file somewhere and use that as a template for performing further operations on it.
The only thing close to a wrapper for PowerPoint I've found is the Open XML PowerTools. It includes a PresentationBuilder class which can be used for some specific tasks like combining slides from multiple PowerPoint documents into a new document. Although its pretty limited in its functionality you could extend the class.
However, I've come to the conclusion that there just is not a good wrapper out there so I've had to do what everybody pretty much recommends and that is using the Open XML SDK Productivity Tool and the Reflect code button.
I put together a basic presentation then Reflect Code and put that into a class. Yes its a lot of lines of code and its not the most elegant solution but it does work. Then from there I can extend or modify that class to do the specific things I need to do with each slide. The Productivity Tool is a big help for figuring out the code need to do specific things. I try to keep it simple and just do one or two things at a time, Reflect Code, then look at the code to see what it does.
You could try SoftArtisans PowerPointWriter, it has a template mode that allows you to start with an existing PowerPoint file with a few place holders, and merge your data with your presentation with as little as 5 lines of code.
Disclaimer: I work for SoftArtisans

manipulate visio format file programmatically

I want to extract information from a Visio file and do some change on them(like using C++), then write them back?
My question is:
Is manipulating visio files(mainly reading and writing) programmingly possible?
If so, any tutorial lin is preferred
Reading/Writing Visio VSD Files
This is a binary format and as far as I know, it is not documented. However, check out what has been going with support for reading Visio VSD files in LibreOffice.
Reading/Writing Visio VDX files
These are just the XML equivalent of VSD files and relatively straightforward to read and write if you are familiar with Visio. For simple tasks such as finding and manipulating all shape custom properties or formatting it will be very straightforward to load the XML into a DOM, process it, and then save it back out. For example, I once wrote a small tool that used this technique to search and replace text in a set of VDX files. One warning: the more complex a task you want to perform, the more you will need to be very familiar with Visio and how it works with Shapesheets, etc.
Here's a link to get started: http://msdn.microsoft.com/en-us/library/aa218409(v=office.10).aspx

How to convert powerpoint pptx file to ppt file programmatically without powerpoint installed?

How can I convert a pptx file to a ppt file programmatically. This happens on a web server that does not have PowerPoint installed.
I'm after a free solution preferably.
I may consider installing PowerPoint on the server if it is not possible but I'm concerned about the scalability of that solution. I wouldn't want the server to be struggling because multiple conversions are in progress...
Thanks
You could install OpenOffice Impress (Libre Office Impress) on the server, maybe it can do the document conversion.
I hear that in OpenOffice, there are python APIs avalaible, and maybe more, even a VBA clone.
It is probably not possible to convert from the command line like this,
ooimpress -infile "mydoc.pptx" -outfile "mydoc.ppt"
In any case, the conversion will probably not be perfect. If your pptx files contain embedded OLE documents, expect problems.
SImple slides with bulleted lists and some simple graphics objects (circles, arrows, Raster Graphics files such as gifs) are less likely to be a problem.
Here are some links to openoffice forum-threads with similar problems.
.doc to .pdf, all command-line?
http://www.oooforum.org/forum/viewtopic.phtml?t=5513
Help! - Simple command line conversion of Word doc to XML
http://www.oooforum.org/forum/viewtopic.phtml?t=7242
The presentation object has a SaveAs method that can do this. For instance,
for saving the active presentation as a .ppt file, the following code would
do the job:
ActivePresentation.SaveAs "FileName.ppt", ppSaveAsPresentation
Reference:
http://www.pcreview.co.uk/forums/programmatic-conversion-pptx-into-ppt-t3339221.html

extract ppt from office word using OpenXml format through c#

I want to extract a flash object from a word doc using OpenXml.I have done it other way round but it is not working as, if there are many flash objects then the processing time got hampered and henceforth i think openxml is more suitable>please someone help me in doing the same .I am coding in c#
Use this: Standalone tool for extracting embedded Office Open XML objects from files

Can I generate Excel files with native Excel charts on Linux?

Is there a way to generate Excel spreadsheets with Perl on Linux so that I can open the spreadsheet on Windows and it creates native Excel graphics? I know that there are libs to draw graphics but all libs I know simply insert a picture to the Excel which looks weird when I open the spreadsheet on Windows. So I wondering is there a way to do it better? Possibly I could embed a VB script or something so that it creates a graphics automatically when I open the spreadsheet on Windows? The original spreadsheet must be generated on Linux so there are no ways to use OLE or some other Windows-only technology.
Thanks guys! Spreadsheet::WriteExcel seems to be a good solution. Did not understand at the first glance if it allows to change dimensions of data or it is hardcoded in a template file (10 points for example, no more, no less). Does anyone know?
If anyone knows another way of doing my task, please post it here. I'm interested in comparing of different solutions and select the best.
Yes, Spreadsheet::WriteExcel has a embed_chart($row, $col, $filename, $x, $y, $scale_x, $scale_y) function which lets you do this.
Spreadsheet::WriteExcel allows you to insert charts from existing files (with some caveats).
See, the following sub-document on Spreadsheet::WriteExcel Charts and the examples files in the distro, such as this one.
P.S. I am the author of that module.
Try Spreadsheet::WriteExcel.

Resources