Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Thursday, October 18, 2018
About Us
Magazine
Open Source
CVS
Services
Index  »  Dev Resources  »  Converting files from command line

How to convert files from OOo formats to other formats via the command line

Author: Michal P. | Section: Dev Resources | Date: 2006-04-18

When publishing to website, it is sometimes desired to have these files published in different formats, eg sxw and pdf format. We will show you how to do this from command line using openoffice and oooconv library.

Neccessary elements:

  1. openoffice.org set up and running
  2. macro from oooconv website installed in main part (not only in file) in Standard.Module2
  3. convert.sh script installed

usage is then easy: convert.sh PDF test.sxw or convert.sh PDF *.sxw

convert.sh script:

#!/bin/sh

# # convert.sh # # Developed by Michal Palenik # Copyright (c) 2006 Platon Group, http://platon.sk/ # Licensed under terms of GNU General Public License. # All rights reserved. # # Changelog: # 2006-04-18 - created #

# $Platon$ # readme # usage basename to_what(PDF,MSXP,...) what(file) # download macro from http://oooconv.free.fr/oooconv/oooconv_en.html # and save it as Standard.Module2 (global) under user you will convert it under # beware: it is _very_ time consuming operation # # todo: switch to OOo2, more cpu effectivenes, less display

to=$1; eval "unset $1;"; for i in $* do if [ "$i" != "$to" ] then echo "converting $i"; ooffice -minimized -headless "macro:///Standard.Module2.Exporte("$PWD/$i","$to","")" else echo "not converting $i" fi; done;

What is Platon?
Plato was a very important classical Greek philosopher, student of Socrates and teacher of Aristotle. learn more...

Platon Group is Slovak open source software development group. We are developing, maintaining, documenting some successful open-source projects.

Platon Technologies, Ltd. is young dynamically developed enterprise, which goal is to bring open technologies into the commercial sphere.

Support Us

Powerful Web-Hosting
and Multihosting

Platon Webhosting

Super Fast Servers
& Professional Administration

Virtual, Dedicated and Managed Servers

Development
Article discussion

   

 
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy