Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
June 1, 2005, 3:46 pm
rate this thread
I have a fairly complex Perl script that reads in data from an XML file
processes it and writes it to a text file. This works well. I now wish to
make some words bold, italic, superscript etc. On a Win32 platform I could
automate MSWord to do this but I would like it to be portable, so I would
prefer to produce an OOo document.
I have installed the OODoc module tested it. All fine
I have found the documentation sparse and confusing and cannot fathom how to
make it append formatted text to a paragraph. I want to say 'append this
string in bold', 'append this string in italics', 'append this string as a
superscript' etc. I assume I need to use the 'appendText' method with
appropriate options but I can't see an example of its usage.
Can suggest the syntax I need?
Would I be better off using RTF::Writer?
Re: Can I use OODoc to create a paragraph with a mix of bold and normal text?
Thanks Mark. However this is the documentation I have already seen (it is in
text.pod with the installed module), it doesn't show me how to change the
formatting for a sub-element of the paragraph. The example given doesn't
even append text to an existing paragraph it generates a new one. I'm
beginning to think that I will need to use OODoc:XPath to acheive what I
want and to do this would need to understand the file format at a deepish
level. It looks messy and complicated compared to automating Word, but I am
trying to free all my stuff from propriety formats and so want to use
I should also mention that my text is UTF-8 and this produces errors in
Encode.pm which is presumably used by OODoc. I haven't looked into why yet.