| 日 | 一 | 二 | 三 | 四 | 五 | 六 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 |
OpenOffice PPT to SWF conversion
The OpenOffice Basic macro is below.
The macro opens the ppt document and converts each slide to an .sxi file (OO's native presentation format). The reason for this step is that I've found OO does a better job of interpreting the vectors from an sxi file as opposed taking them from the ppt. The macro then converts each of the .sxi files to an individual .swf, and deletes the .sxi
The macro also collects slide titles, and writes them to an XML file in the destination directory (described below) along with the slide .swf's
The macro is expecting the following input variables
strFile - This the full path (path... not url) to the ppt document to be converted
dirName - this the full path to the destination directory for your slides and XML file. On windows, if the directory does not exist it will be created (don't know if that happens on Linux... let me know if it does).
If you're running this macro as an automated process, I stongly suggest you createa unique destination directory for each conversion.
Here's the code. I don't know if the forum will add any whitespace or newlines when I post the code, but this is basic so you'll need to check for whitespace at the end of each line when you build your basic file. If OO spits out errors you can't track down, let me know and I'll post the basic file for download.
The code also contains what's needed if you want a PDF from the slides as well. If you wan the pdf's, just look at the comments... you'll see which line to un-comment.
As far as invoking the macro, I do it with a batch file on windows. I'm not a Linux guy, so I don't know how the shell script would be written.
Assuming the macro is located at soffice>pptConv>ppt the windows bat file would look like this:
If you saved this batch file as c:\conversion\ppt.bat, you would run from the command line like so:
So you know, OO can export the ppt directly to a single .swf, but it adds odd actionscript makes the .swf's hard to navigate.
Also, the individual slides create by the macro process above will have the silde graphics, anda button that covers the whole stage. Sadly... nothing has instance names, so it can be a project picking out and killing the buttons. If you have a decompiler, you'll see what I mean. I tend to place a movie clip over the slides when I use them in another .swf to kill the hand cursor.
Only way around that is to use OO to convert the ppt to pdf, and then use pdf2swf to turn the pdf into an .swf. that takes care of the navigation slopiness, but I've found that pdf2swf makes a mess of the graphics. Play around with it and you'll see what I mean.
If you're unfamiliar with installing macros on OO, check out their support forum. It took me less than a day to findwhat I needed there when I was getting started with OO.
http://www.ooforum.org
You'll also find that OO will convert just about any office document... doc, xls, and rtf included to .swf.
The macro opens the ppt document and converts each slide to an .sxi file (OO's native presentation format). The reason for this step is that I've found OO does a better job of interpreting the vectors from an sxi file as opposed taking them from the ppt. The macro then converts each of the .sxi files to an individual .swf, and deletes the .sxi
The macro also collects slide titles, and writes them to an XML file in the destination directory (described below) along with the slide .swf's
The macro is expecting the following input variables
strFile - This the full path (path... not url) to the ppt document to be converted
dirName - this the full path to the destination directory for your slides and XML file. On windows, if the directory does not exist it will be created (don't know if that happens on Linux... let me know if it does).
If you're running this macro as an automated process, I stongly suggest you createa unique destination directory for each conversion.
Here's the code. I don't know if the forum will add any whitespace or newlines when I post the code, but this is basic so you'll need to check for whitespace at the end of each line when you build your basic file. If OO spits out errors you can't track down, let me know and I'll post the basic file for download.
The code also contains what's needed if you want a PDF from the slides as well. If you wan the pdf's, just look at the comments... you'll see which line to un-comment.
Code:
|
As far as invoking the macro, I do it with a batch file on windows. I'm not a Linux guy, so I don't know how the shell script would be written.
Assuming the macro is located at soffice>pptConv>ppt the windows bat file would look like this:
Code:
|
If you saved this batch file as c:\conversion\ppt.bat, you would run from the command line like so:
Code:
|
So you know, OO can export the ppt directly to a single .swf, but it adds odd actionscript makes the .swf's hard to navigate.
Also, the individual slides create by the macro process above will have the silde graphics, anda button that covers the whole stage. Sadly... nothing has instance names, so it can be a project picking out and killing the buttons. If you have a decompiler, you'll see what I mean. I tend to place a movie clip over the slides when I use them in another .swf to kill the hand cursor.
Only way around that is to use OO to convert the ppt to pdf, and then use pdf2swf to turn the pdf into an .swf. that takes care of the navigation slopiness, but I've found that pdf2swf makes a mess of the graphics. Play around with it and you'll see what I mean.
If you're unfamiliar with installing macros on OO, check out their support forum. It took me less than a day to findwhat I needed there when I was getting started with OO.
http://www.ooforum.org
You'll also find that OO will convert just about any office document... doc, xls, and rtf included to .swf.
login to post comments

Recent comments