Can I use OODoc to create a paragraph with a mix of bold and normal text?

D

Dave

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?

Dave
 
M

Mark

Dave said:
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.

is

http://perl.enstimac.fr/perl5.8.5/s...t.html#appendtext_element_name_____options___

any help?
 
D

Dave

Mark said:

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
OpenOffice.

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.

Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top