chuggnut has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I'm currently trying to produce documents based on complex templates and therefore decided to give openoffice::oodoc a go.

However I've trawled through the manuals and I'm a bit stuck.

All I want to do is create a text box that is positioned at a certain set of coordinates on the page.

Please enlighten me.

Thanks Chuggnut

Replies are listed 'Best First'.
Re: help with openoffice::oodoc
by chargrill (Parson) on Apr 27, 2006 at 19:38 UTC

    I've never used the module, but the documentation seems pretty straightforward. I can only imagine the ability to precisely position text if you use a table. Relevant snippets of the docs:

    insertTable(element, name, rows, columns [, options]) Creates a new table and inserts it immediately before or after another element (paragraph, header, table). The referenced ele +ment can be indicated as in insertParagraph. The other arguments an +d options are the same as for appendTable with the additional op +tion 'position' as in insertParagraph.

    And then to set the contents of your cell:

    updateCell(element, value [, text]) Modifies the content of a table cell. In its first form, indicates a cell by its 3D coordinates, as +with getCell(). In its second form, indicates a cell by its element reference. If the cell is set to literal, its content is limited to its t +ext. In this case, the optional argument "text" is of no use (the t +ext equals the value). If the cell is set to numeric (float, currency, date, etc.), y +ou should generally pass a literal argument as well as the value. This method can be replaced by the accessor cellValue which al +lows reads and writes.


    --chargrill
    $,=42;for(34,0,-3,9,-11,11,-17,7,-5){$*.=pack'c'=>$,+=$_}for(reverse s +plit//=>$* ){$%++?$ %%2?push@C,$_,$":push@c,$_,$":(push@C,$_,$")&&push@c,$"}$C[$# +C]=$/;($#C >$#c)?($ c=\@C)&&($ C=\@c):($ c=\@c)&&($C=\@C);$%=$|;for(@$c){print$_^ +$$C[$%++]}
Re: help with openoffice::oodoc
by GrandFather (Saint) on Apr 27, 2006 at 18:04 UTC

    Where is the Perl component of this question - I seem to be missing it?

    Perhaps you need to rephrase your question so we know how our collective Perl and related knowledge can help you, or you could even post some code that you are having trouble with in the context of this problem.


    DWIM is Perl's answer to Gödel
      openoffice::oodoc is a perl module is it not?

      In this instance, if I could post the code I wouldn't need any help.

      All I need is someone with experience with using openoffice::oodoc to point me in the right direction. Just the name of the command to set the x and y coordinates of a textbox.

      Thanks for your comment it was extremely helpful.

      Chuggnut

        I appologise. My only excuse (and a poor one) is early morning grumps due to being awakend at 5am by our 3 1/2 year old twins.

        A quick look at the docs for the module suggests that only image items can be positioned in that fashion and it is not obvious that you can show "raw text" in place of an image.


        DWIM is Perl's answer to Gödel