I am trying to set big height and width for the first page and the smaller size for other pages.
I am using Thujohn\Pdf\PdfFacade library in laravel.
below is my code.
<html>
<head>
<style>
<?php
$pageWt = $drawing_width + 200; //very large size
$pageHt = $drawing_height + 200;//very large size
?>
@page { size: <?= $pageWt ?>px <?= $pageHt ?>px; }
@page rotate { size: 400px 500px; }
.pgbrk {
page : rotate;
font-size: 70px;
page-break-before: always;
}
</style>
</head>
<body>
<img src="<?= URL::to('drawings/getDrawing?filepath=' . $filepath) ?>">
<div class="pgbrk">
some data
</div>
<img src="<?= URL::to('drawings/getDrawing?filepath=' . $filepath) ?>">
<div class="pgbrk">
some data
</div>
<img src="<?= URL::to('drawings/getDrawing?filepath=' . $filepath) ?>">
<div class="pgbrk">
some data
</div>
<img src="<?= URL::to('drawings/getDrawing?filepath=' . $filepath) ?>">
<div class="pgbrk">
some data
</div>
</body>
</html>
But above code sets same size for all pages.
I am expecting different sizes for pdf pages.
Do am I missing something. Please help.