[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: Koffice file manipulation
From: MichaelHoeller () t-online ! de (Michael Hoeller)
Date: 2003-08-27 11:13:36
[Download RAW message or body]
Hello Nicolas,
thanks for the tip, this works also for me but it seems to become a
problem when there are more tags. I have not jet understood the len in
the format string and how to change it appropiate.
Michael
<PARAGRAPH>
<TEXT xml:space="preserve" >test ^adr1 test</TEXT>
<LAYOUT>
<NAME value="Standard" />
<FLOW align="left" />
<FORMAT id="1" pos="0" len="15" >
<WEIGHT value="48" />
<COLOR blue="-1" red="-1" green="-1" />
<FONT name="Univers 45" />
<SIZE value="10" />
<ITALIC value="0" />
<VERTALIGN value="0" />
<TEXTBACKGROUNDCOLOR blue="-1" red="-1" green="-1" />
</FORMAT>
Nicolas Goutte wrote:
> Also be careful! The file maindoc.xml is encoded in UTF-8, so any
> data that you replace there must be in UTF-8 too or you would indeed
> corrupt the file.
>
> Have a nice day!
>
> On Tuesday 26 August 2003 20:16, Nicolas Goutte wrote:
> (...)
>
> > I have made a test with ^adr1 in text and tried to modify it to
> > AdressOne. I have saved the KWord file as test.kwd.
> >
> > unzip -p test.kwd maindoc.xml | sed "s/\^adr1/AdressOne/g" >
> > maindoc.xml zip kword.kwd maindoc.xml
>
> (...)
>
> > Have a nice day!
> >
> > On Tuesday 26 August 2003 19:17, Michael Hoeller wrote:
> > > Hi there,
> > >
> > > I like to manipulate a koffice file without opening koffice - yes
> > > there is a vaild scenario:
> > >
> > > Assuming I use Koffice and the exclent layout features to set up
> > > (lay-out) a document. Within the doument I place tags as place
> > > holders like ^adr1 for the first line of an address.
> > >
> > > Now there is an other application which holds the values for e.g.
> > > ^adr1, .. This application should be able to replace the tags
> > > (her ^adr with its real values) and send the manipulated file to
> > > a printer.
> > >
> > > This currently works fine for OpenOffice with PS Documents, but I
> > > had to learn that the tags get in the KOffice xml-file an
> > > absolute position and length what is different to Postscript.
> > >
> > > So I thought of the scripting features, of KOffice. Is there a
> > > way to replace my "tags" in an KOffice file with variing strings?
> > > And send the manipulated fiel to a printer?
> > >
> > > Thanks a lot
> > > Michael
> >
> > _______________________________________________
> > koffice-devel mailing list
> > koffice-devel@mail.kde.org
> > http://mail.kde.org/mailman/listinfo/koffice-devel
>
> _______________________________________________
> koffice-devel mailing list
> koffice-devel@mail.kde.org
> http://mail.kde.org/mailman/listinfo/koffice-devel
--
Encrypted eMail welcome!
Get my OpenPGP-Key ID: 0xE9B00731 from: wwwkeys.de.pgp.net
_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic