Hi Everyone,
    I need a perl script to create a word document in linux (in my system i have openoffice(oowriter) 1.1.5) with some text as header(left aligned) which is taken from a "file.txt".
    contents of the file.txt are
    HariKrishna  1200
    Srikanth     1201
    Madhav       2345
So based upon the no of lines in the file.txt i need that many pages with header taken from file
So First page header should be as Harikrishna
So Second page header should be as Srikanth
So Third page header should be as Madhav

Thanks in advance
Srikanth M.

OpenOffice::OODoc looks like the module you need to install and learn how to use. I have no expertise with it so if you don't want to learn how to do it yourself I think you may need to hire a programmer with the relevant experience to write a script that does exactly what you want. Just to illustrate what the OpenOffice::OODoc module can do, here is a script that creates a document file with three pages of your sample data:

use strict; 
use warnings; 

use OpenOffice::OODoc;

my $oofile = odfDocument
                        file            => 'oowriter_test.odt',
                        create          => 'text'

my $styles = odfDocument
                container => $oofile,
                part => 'styles'
# process any content and style element

                parent => 'Text body',
                family => 'paragraph',
                properties =>
                        area            => 'text',
                        'fo:color'      => rgb2oo('blue')

while (my $rec = <DATA>){

    my $pg = $oofile->appendParagraph
                text => $rec,
                style => "BlueStyle"
    $oofile->setPageBreak($pg,style => 'autopb', position=>'after');


HariKrishna  1200
Srikanth     1201
Madhav       2345
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.