*Solved*use OpenOffice::OODoc; my $document = ooDocument( file => 'outputfile.odp', create => 'presentation' ); $document->createStyle( "TB", family => "paragraph", parent => "objectwithshadow", properties => { 'style:vertical-pos' => 'from-top', 'style:horizontal-pos' => 'from-left', 'style:vertical-rel' => 'page', 'style:horizontal-rel' => 'page', 'style:font-size' => '36pt', 'style:font-weight' => 'bold', } ); $document->createStyle ( "Colour", family => 'paragraph', parent => 'Standard', properties => { 'fo:margin-left' => '2cm', 'fo:margin-right' => '1.5cm', 'fo:text-align' => 'justify', 'fo:background-color' => '#ff00ff' 'fo:font-size' => '36pt', } ); $para = $document->createParagraph( "hello world", "Colour" ); $slide = $document->getDrawPage(0); $document->createTextBox( attachment => $slide, size => '10cm, 10cm', position => '4cm,4cm', content => $para, style => 'TB', ); $document->save;
We could provide this new style with additional properties related to the text content of the paragraph. But, in a paragraph style definition, the "text" properties are not stored in the same logical area than the "paragraph" properties, and we can't set both in the same instruction. Fortunately, we can enrich any existing style at any time through the updateStyle() method
It has to be splitted into two statements. I just tested something similar successfully.$document->createStyle ( "Colour", family => 'paragraph', parent => 'Standard' ); $document->updateStyle( "Colour", family => 'paragraph', parent => 'Standard', properties => { 'fo:margin-left' => '2cm', 'fo:margin-right' => '1.5cm', 'fo:text-align' => 'justify', 'fo:background-color' => '#ff00ff' 'fo:font-size' => '36pt', } );
print+qq(\L@{[ref\&@]}@{['@'x7^'!#2/"!4']});
In reply to OpenOffice::OODoc howto set size for textboxes by codeacrobat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |