Create Web Banners with OpenOffice

This is an example from Perl and OpenOffice.

The important thing to note is that the full path names is required for $fn. If you fail to do this, you will get an unhelpful error message.

#!/usr/bin/perl

my $fn='c:/es/paper/paper/OOO/PGBANNER/shapes3D.sxd';
create_gif_from_sxd($fn);

sub create_gif_from_sxd
{
  my ($fn)= @_;
  my $soffice= 'c:/program files/OpenOffice.org1.1.4/program/soffice';
  my $macro  = "macro:///Standard.Module1.ConvertDrawToGIF($fn)";
  my $status = `"$soffice" -invisible "$macro"`;
  return $status;
}

08/01/2005

By toma