|
I have the following code :
subroutine call :
placetextbox($document,$page,"This is a test text.",2,3,1.5,9);
The subroutine is :
sub placetextbox {
my ($document, $page,$text1,$textx,$texty,$texth,$textw)=shift(@_);
my $frame = $document->createFrame
(
'name' => "Frame 1",
'page' => $page,
'position' => "$textx,$texty",
'size' => "$textw cm,$texth cm"
);
my $box = $document->appendElement
(
$frame, 'draw:text-box',
);
$document->appendParagraph
(
attachment => $box,
text => $text1
);
}
From what documentation exists on createFrame, I think I have used the correct syntax. However, this is producing a blank slide. Can anyone please point out what I am doing wrong ?
Thanks. |