开发者

TCPDF: Mixed orientation in one pdf

Is it possible to have mixed orientation in one PDF. E.g. some pages portrait and some landscape? Or is it possible to rotate c开发者_开发技巧ontent? I can see that you can set the overall orientation can be set in the constructor, but didn't see anything.

MS


It's actually pretty easy all yo have to do is when you add a page:

// protrait
$tcpdf->addPage( 'P', 'LETTER' );

// landscape
$tcpdf->addPage( 'L', 'LETTER' );


For rotating the content you can use the following code.

$pdf->StartTransform();
$pdf->Rotate(-90);
$pdf->Cell(0,0,'This is a sample data',1,1,'L',0,'');
$pdf->StopTransform();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜