Author Topic: Showing OpenOffice.org Impress documents on a Z  (Read 3069 times)

holck

  • Newbie
  • *
  • Posts: 34
    • View Profile
Showing OpenOffice.org Impress documents on a Z
« on: October 19, 2004, 09:38:00 am »
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: [Select]
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
« Last Edit: October 19, 2004, 03:02:50 pm by holck »
SL760, tkcROM, ASUS WiFi

acpkendo

  • Full Member
  • ***
  • Posts: 169
    • View Profile
    • http://
Showing OpenOffice.org Impress documents on a Z
« Reply #1 on: October 19, 2004, 10:22:33 am »
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[/a]
http://www.killefiz.de/zaurus/showdetail.php?app=832

Hrw

  • Hero Member
  • *****
  • Posts: 1366
    • View Profile
Showing OpenOffice.org Impress documents on a Z
« Reply #2 on: October 22, 2004, 10:10:11 am »
PoqetPresenter is in OZ 3.5.1 feed
OpenZaurus 3.5.4x Release Manager
OpenEmbedded, Ångström, Poky developer
My website

Misc embedded hardware.

zautrix

  • Sr. Member
  • ****
  • Posts: 437
    • View Profile
    • http://www.pi-sync.net
Showing OpenOffice.org Impress documents on a Z
« Reply #3 on: October 22, 2004, 10:29:11 am »
Quote
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.
« Last Edit: October 22, 2004, 10:30:41 am by zautrix »

LadyBug

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
    • http://
Showing OpenOffice.org Impress documents on a Z
« Reply #4 on: October 27, 2004, 04:32:54 am »
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.
C760, Symbol CF WiFi, Lexar 1GB SD, score of CFs
Currently running pdaXrom.