Categories > [old] TbsOoo & TinyDoc >

Images and OpenOffice

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: S
Date: 2007-09-13
Time: 15:01

Images and OpenOffice

Hello,

did somebody have an PHP-CLASS or idea to make  images dynamic so that i can change or insert images in an OpenOffice Document?
By: SunWuKung
Date: 2007-12-08
Time: 13:52

Re: Images and OpenOffice

There are two things I do to achieve this
- insert all the pictures into the Oo documents that may appear and place it in a conditional block so that those not needed would be deleted
- when doing dynamic bars I insert a small rectangle drawing object to the bottom of the document into a conditional block where it will get deleted, go to the content.xml and copy the xml of the drawing object into the document, with a TBS variable that will replace the length, like this:

<draw:rect text:anchor-type="char" draw:z-index="0" draw:style-name="gr1" draw:text-style-name="P8" svg:width="[engt.brlenght]pt" svg:height="13.01pt" svg:x="3.09pt" svg:y="7.4pt"></draw:rect>

When you do this Oo will replace the xml characters to html entities so in the php I run a replace on the Oo source which replaces those entities with the original.

hth
SWK