Help - Search - Members - Calendar
Full Version: Showing OpenOffice.org Impress documents on a Z
OESF Forums > General Forums > General Support and Discussion > Software
holck
The Presentation program on the Zaurus can show slideshows of e.g. PNG-files, and if you use IO Data's CFXGA card, these presentations can be shown on a video projector. Microsoft's PowerPoint can export a presentation as a series of PNG-files, but this is not possible with OpenOffice.Org Impress. In order to remedy this, I've combined various code snippets from the net into a macro, which can do just this: export an Impress document as a series of 800x600 pixels PNG files. Maybe other people will find this macro useful, so I post it here:
CODE
Sub ExportPng
 REM Filter dependent filter properties

 Dim aFilterData (1) As New com.sun.star.beans.PropertyValue
 Dim sFileUrl As String

 aFilterData(0).Name  = "PixelWidth"
 aFilterData(0).Value = 800
 aFilterData(1).Name  = "PixelHeight"
 aFilterData(1).Value = 600
REM  aFilterData(2).Name  ="LogicalWidth"
REM  aFilterData(2).Value = 1000
REM  aFilterData(3).Name  ="LogicalHeight"
REM  aFilterData(3).Value = 1000
REM  aFilterData(4).Name  ="Quality"
REM  aFilterData(4).Value = 60

 odoc=thiscomponent
 octl=odoc.getcurrentcontroller()
 for i = 0 to odoc.getdrawpages().count -1
   slide=odoc.drawpages(i)
   octl.setCurrentPage(slide)
   sFileUrl = "file:///home/holck/Desktop/OOo/" + "slide"+ Format(i, "000")+ ".png"
   xDoc = ThisComponent
   xView = xDoc.currentController
   xObj = xView.currentPage
   Export( xObj, sFileUrl, aFilterData() )
 next
End Sub

Sub Export( xObject, sFileUrl As String, aFilterData )
 Dim  xExporter

 xExporter = createUnoService( "com.sun.star.drawing.GraphicExportFilter" )
 xExporter.SetSourceDocument( xObject )

 Dim aArgs (2) As New com.sun.star.beans.PropertyValue
 Dim aURL As New com.sun.star.util.URL

 aURL.complete = sFileUrl
 aArgs(0).Name  = "MediaType"
 aArgs(0).Value = "image/png"
 aArgs(1).Name  = "URL"
 aArgs(1).Value = aURL
 aArgs(2).Name  = "FilterData"
 aArgs(2).Value = aFilterData
 xExporter.filter( aArgs() )
End Sub


/Jesper
acpkendo
holck,

This seems like a great macro to help Impress operate cross-platform. . .

FYI, there is an app that displays Impress files on the Z:

http://poqetp.sourceforge.net/" target="_blank">PoqetPresenter
http://www.killefiz.de/zaurus/showdetail.php?app=832
Hrw
PoqetPresenter is in OZ 3.5.1 feed
zautrix
QUOTE(holck @ Oct 19 2004, 02:38 PM)
The Presentation program on the Zaurus can show slideshows of e.g. PNG-files, and if you use IO Data's CFXGA card, these presentations can be shown on a video projector. Microsoft's PowerPoint can export a presentation as a series of PNG-files, but this is not possible with OpenOffice.Org Impress. In order to remedy this, I've combined various code snippets from the net into a macro, which can do just this: export an Impress document as a series of 800x600 pixels PNG files. Maybe other people will find this macro useful, so I post it here:

/Jesper

FYI:

There is already a pretty cool platform independent presentation viewer for Linux, Mac and Wintendo for Openoffice and KOffice:

http://www.indeview.org

I will make this app soon (in 1-2 months) together with the original author available for the Zaurus, because I have already an XGA video card for my Z 760.

z.
LadyBug
Nice.

But what I really need is a way to EDIT presentation files on my Zaurus so that I can dump the resulting PPT/PDF to a CF card, put the CF card on a PCMCIA sleeve and put that on a usually pre-existing Windows laptop to be presented.

In June I made a trip to US where I was supposed to make a presentation. I decided to leave my laptop home and took only my Zaurus.....to realize two days into my trip that I had to edit my presentation to reflect some stuff other people had said. So for that task only I had to borrow a colleague's laptop, otherwise I was very fine with my Zaurus, WLAN access and all. Very annoying.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.