$d
=-20;
$pdf
=Text::PDF::API->new(
pagesize
=>
'a4'
,
'compression'
=>0);
$pdf
->newpage();
$pdf
->newFont(
'Times-Roman'
);
$pdf
->newFont(
'Helvetica-Bold'
);
$pdf
->useFont(
'Helvetica-Bold'
,10);
$pdf
->beginText();
$pdf
->textFont();
$pdf
->textLeading(14);
$pdf
->setColorFill(1,0,0);
$pdf
->textPos(100,100);
$pdf
->textAdd(
'this is read '
);
$pdf
->textNewLine;
$pdf
->setColorFill(0,1,0);
$pdf
->textFont(
'Times-Roman'
,20,
'cp850'
);
$pdf
->textAdd(
'this is green '
);
$pdf
->clearFontMatrix;
$pdf
->setFontRotation(45);
$pdf
->calcFontMatrix;
$pdf
->textFont();
$pdf
->textPos(200,100);
$pdf
->setColorFill(0,0,1);
$pdf
->textAdd(
'this is plue '
);
$pdf
->endText();
$pdf
->endpage();
$pdf
->saveas(
"$0.pdf"
);
$pdf
->end;